The Financial Conduct Authority's departing chairman has defended the regulator's record after a gruelling period when MPs published a report into Royal Bank of Scotland's treatment of customers that the FCA wanted to keep secret.

John Griffith-Jones told a City conference that chairing the FCA was harder than he expected when he took on the job five years ago but that the regulator had established itself as a world leader.

Griffith-Jones, who hands over to Charles Randell on 1 April, said: “In retrospect, perhaps I hadn't realised quite how difficult a job it was going to be. I must say that my five years have certainly had their ups and downs. Certainly like any new organisation we had our teething problems.”

He took over at the FCA when it replaced the Financial Services Authority in early 2013. After the FSA was accused of being too soft on banks in the run-up to the financial crisis its supervisory powers were handed to the Bank of England.

But the FCA has faced criticism over its handling of Royal Bank of Scotland and the bank's treatment of small business customers. After the FCA repeatedly refused to publish a full version of a report into the matter the Treasury committee responded to online leaks by releasing the report, which was damning in its judgment of how RBS's GRG unit allowed businesses to fail.

Griffith-Jones said the FCA acted in good faith and according to the law and that there is a mismatch between what outsiders want it to do and the legal constraints it faces.

Without referring specifically to RBS he said: “A four year legal process and a dense thicket of jurisprudential argument provide a far less attractive route to redress than the use of 24/7 media and the associated parliamentary support to pressurise the regulator to short circuit due process in contentious cases.”

The FCA's good work has included forcing banks to compensate customers mis-sold payment protection insurance, clamping down on market abuse, punishing banks over the Libor and foreign exchange scandals, and holding senior managers responsible for their companies' failure, Griffith-Jones said.

Consumers are better protected and companies are behaving better, he said.

“I am not naïve enough to imagine that misconduct has disappeared. Nor that Western European capitalism has undergone a spiritual epiphany. But I have witnessed financial services firms promote, and in some cases transform, their attention to customer outcomes from where it was in 2013.”