Consumers who have been tricked into authorising bank payments to fraudsters are more likely to be reimbursed by their bank in future thanks to new rules agreed by the industry.
Customers have lost millions of pounds through this type of scam, known as "push" or "authorised" payment fraud.
Previously, because the payments were approved by victims, they were less likely to receive compensation.
Now banks and building societies have agreed to do more to protect customers.
Examples of authorised payment fraud include fraudsters posing as builders, solicitors, or other contractors who have carried out work for the victim. They submit a fake invoice containing the fraudster's bank details and it is often not easy to spot that they are not the legitimate payee.
UK Finance, the group representing UK banks, said that in the first half of 2018 such scams cost consumers £92.9m.
A new voluntary code, which comes into effect on 28 May, has been agreed between banks and consumer representatives and is designed to give better protection to customers and reduce the incidence of this kind of fraud.
Customers will still have to have taken appropriate steps to make sure the person they paid was not a scammer, but if they have taken reasonable care, then they will now be much more likely to be reimbursed.
"It is vital that we get the right outcome for customers and prevent the UK from inadvertently becoming a magnet for fraudsters," said Katy Worobec, managing director of economic crime at UK Finance.
The industry has committed to funding compensation until the end of this year "in those situations where both the customer and their payment service provider met the required standards set out in the code".
After January 2020 a more permanent funding arrangement is expected.
Hannah Nixon, managing director for the Payment Systems Regulator, the body which facilitated the new voluntary code said consumers would now receive better protection.
"We're particularly pleased that the steering group has been able to navigate and agree a way to reimburse victims when neither victim nor bank has done anything wrong," she said.
"This was a tough issue that rightly involved much discussion, but the banks have done the right thing for their customers in backing this measure."
Which?, the consumer group that highlighted the lack of protection for bank customers two years ago, welcomed the new code as "a significant step".
However, Gareth Shaw, head of money at Which?, said: "It will only be judged a success if the action taken by banks results in fewer scams and if all victims are treated fairly and reimbursed swiftly.
"It is now vital that all banks, building societies and other payment service providers sign up to the voluntary code and ensure that victims are not forced to clear unreasonable hurdles to prove they are not at fault when they have been targeted by fraudsters.
"The banks must also ensure a long-term funding solution is in place by 1st January 2020, so there can never be a return to the days when people were losing life-changing sums of money through no fault of their own."