David Cameron has appealed for Germany to help him to keep Britain in the EU as he held talks with Angela Merkel as part of his drive to renegotiate membership terms.
The Prime Minister discussed progress on a deal with the German chancellor after dinner at a conference of the Christian Social Union (CSU) party in Bavaria.
In an article for Bild magazine, he insisted the two countries were "key allies" and had to cooperate to make the union "safer and more prosperous".
Later he will travel to Hungary for discussions with counterpart Viktor Orban in Budapest.
Earlier this week Mr Cameron confirmed that ministers will be permitted to campaign for 'Brexit' even if he declares his renegotiation a success.
Downing Street hopes a deal can be secured at a summit of EU leaders next month, potentially paving the way for the decisive poll in June or October.
The main sticking point appears to be Mr Cameron's demand for a four-year ban on migrants to Britain getting in-work benefits - one of four areas in which he is seeking an agreement.
Downing Street said the two leaders "agreed that work should continue at pace, building on the progress which had been made at the last European Council, with goodwill and a commitment from all member states to find solutions in all four areas which matter most to the British people".
The PM's spokeswoman said the talks with Mr Orban would cover "a range of issues - the bilateral relationship, the renegotiation of the UK's EU membership and some of the challenges EU nations are facing more broadly, like migration".
In his Bild article, Mr Cameron warned that support for the EU among the UK public had "declined over many years".
"I am negotiating changes which will address the concerns of the British people. But these changes will benefit the EU too, and Germany can help deliver them," he wrote.
"The problems in the EU that we are trying to fix are problems for Germany and other European partners too.
"We want to sweep away the excessive bureaucracy and the barriers to trade that undermine growth for us all. We want to establish the clear rules that will allow the Eurozone to make changes without damaging non-Euro countries.
"We want to deal with the loss of democratic consent for the EU by shifting power from Brussels to the Bundestag, the House of Commons and other national parliaments, so decisions are made closer to the people.
"And we want to stop people taking out from a welfare system without contributing to it first.
"Because like Germany, Britain believes in the principle of free movement of workers. But that should not mean the current freedom to claim all benefits from day one and that's why I've proposed restricting this for the first four years.
He went on: "Britain and Germany are key allies in creating a prosperous and secure EU. Whether it is our shared belief in free trade and sound finances, our major contribution to the EU budget, our aid to reduce the suffering that drives refugees into Europe, or our military and intelligence services working together against terrorism, we do vital work together.
"Securing these changes will mean we can continue our EU partnership into the future. And they will make the EU safer and more prosperous for generations to come."