People seeking compensation over mis-sold payment protection insurance (PPI) will have to make their claims before 29 August 2019.
The final deadline has been set by the Financial Conduct Authority (FCA) in an effort to draw a line under one of the banking industry's biggest scandals.
Millions of people have already been compensated and banks have set aside more than £40bn to cover the payouts.
It is believed that many more are yet to come forward.
The FCA said it would run a two-year public awareness campaign, starting in August this year, in an attempt to flush out the remaining complainants.
The imposition of a deadline is likely to lead to a fresh wave of text messages and recorded calls by those offering to make claims on a customer's behalf.
What is PPI?
PPI was designed to cover loan repayments if the policyholder fell ill or lost their job.
About 45 million policies were sold over the course of 20 years from 1990.
But it became clear that it was mis-sold on an industrial scale to people who didn't want or need it - or would not be eligible to claim on it.
Process 'wholly inadequate'
Andrew Bailey, chief executive of the FCA said: "Putting in place a deadline and campaign will mean people who were potentially mis-sold PPI will be prompted to take action rather than put it off.
"We believe that two years is a reasonable time for consumers to decide whether they wish to make a complaint."
The biggest five banks - Lloyds, Barclays, RBS, HSBC and Santander - have collectively set aside more than £35bn to cover the cost overall, but the bill for the industry could have been much higher.
However, some consumer groups have criticised the manner of the compensation system, arguing that banks should have been proactively finding and paying back customers who were mis-sold PPI.
Vickie Sheriff, director of campaigns at Which?, said: "It has been clear for years that the banks should be working much harder to resolve PPI claims fairly.
"The current process has been wholly inadequate and driven too many consumers to use claims management companies. Now the regulator has confirmed a deadline for the victims of this mis-selling scandal to make a claim, it must ensure that banks are doing much more to help customers get back the money they are owed."
Martin Lewis, founder of Moneysavingexpert, said: "The deadline is a mistake. The stats are plain. Flabbergastingly, in over half of all cases where after the bank rejects a PPI reclaim people take it to the independent ombudsman, the bank's rejection is overturned.
"Until we can trust banks to deal with complaints fairly in the first instance, this move to protect their balance sheets should not happen. It is putting the protection of the financial industry ahead of consumers."
Last month, the Financial Ombudsman Service disclosed that it had received 78,000 new PPI complaints in the six months to last December.
The ombudsman deals with complaints that financial firms have been unable to settle themselves.
Since 2003, about one and a half million people have been so dissatisfied with the PPI offers that were made to them, or the outright rejection of their claims, that they have subsequently gone to the financial ombudsman.
Another chance to claim
The FCA has also confirmed that some bank customers will have new grounds to complain if they were not made aware of commission being paid when they were sold PPI.
This follows a Supreme Court judgment in November 2014 - what is known as the Plevin decision - which extended the definition of mis-selling.
The court agreed that the company's failure to tell its client that it was receiving a large commission for the sale was unfair.
The FCA has decided that compensation will be calculated if more than 50% commission was paid.
Anyone who has had complaints rejected will receive a letter explaining that they might have new grounds for a claim.