A bullish David Cameron has signalled he is increasingly confident of achieving an historic deal to reform Britain’s membership of the European Union as he made clear the changes he is seeking will not stop there.

Addressing the annual St Matthew’s Day banquet in Hamburg, the Prime Minister insisted his proposals on welfare curbs, trade and sovereignty would “help deliver the more competitive, outward-looking, dynamic Europe that Britain and Germany both want to see”.

As British and EU officials continue to pore over the fine detail in a bid to secure an agreement between all 28 member states at next week’s Brussels summit, Mr Cameron told his audience, which included Chancellor Angela Merkel, that Britain’s call for member states to run their own welfare systems “resonates around Europe”.

He also talked up how the EU needed Britain to remain within it, saying: “Just as I believe Britain will be safer and more prosperous in a reformed European Union, so too will Europe benefit from keeping its second largest economy, its largest defence power, a major diplomatic force in the world, and, of course, its second largest financial contributor.”

While the PM again said he ruled nothing out if Britain could not secure a deal, he appeared confident an agreement was on the cards, saying: “Even when we have secured the changes I am arguing for, the job will not be done.

“There will be many things that would remain to be reformed and Britain would continue to stand alongside Germany in leading the way.

“Because at the end of all this, the reason why I believe it is so vital to keep Britain in a reformed European Union is that when I look at the world today and where it is going I am convinced more than ever that we need Britain and Germany working together to shape a European Union that can deliver prosperity and security for us all.”

Mr Cameron talked up the importance of the UK being at the head of the EU to help confront external challenges and maintain economic and military security.

He said: “In a world where Russia is invading Ukraine and a rogue nation like North Korea is testing nuclear weapons, we need to stand up to this aggression together and bring our economic might to bear on those who rip up the rulebook and threaten the safety of our people.”

In denouncing the murderous ideology of so-called Islamic state, the PM insisted Europe had to stand together to confront this ideology and defeat it “for our values, for our security, for our prosperity”.

He added: “That is the Europe that we want to see and that is the Europe that Britain and Germany can deliver together.”

Mr Cameron’s upbeat mood mirrored that of George Osborne, who earlier declared: “There is a real prospect of a deal.”

The Chancellor stressed that getting "the right relationship" between countries that used the single currency and those outside the eurozone, such as the UK, was vital for boosting financial stability across Europe and further afield.

"Getting this all right is absolutely essential to make sure we protect the citizens of the EU and of course, from my point of view, protect the citizens of Britain," he explained.

Despite the UK Government’s increasing confidence a deal can be done, Mr Cameron knows there are many potential pitfalls and last-minute hitches.

The PM has cleared his diary to hold talks in the coming days with some of the strongest doubters, including French President Francois Hollande, Greek Prime Minister Alexis Tsipras, Romanian President Klaus Iohannis and the Czech premier Bohuslav Sobotka.

On Tuesday, just 48 hours before the summit, he will be in Brussels to convince the leaders of the European parliament’s political parties that his proposed reforms are right and workable.

Elsewhere, Ross McEwan, chief executive of RBS, said Britain's financial services industry was better off in the EU.

In an interview on BBC Newsnight, the bank chief said he had seen no "economic data that suggests we'd be better off out" and that the sector was "better off" with Britain in the EU.