David Cameron has insisted he is making progress in his European Union renegotiations despite his Polish counterpart saying they did not "see eye-to-eye" on his bid to reform welfare rules.
The Prime Minister and his team of officials in Brussels are working "round the clock" to strike a deal and Mr Cameron said he was encouraged by the "goodwill" shown to the UK's demands.
But Polish prime minister Beata Szydlo said further work was needed before there could be consensus on Mr Cameron's demands, particularly over the plan to restrict EU migrants' access to benefits in the UK.
Following talks at the Chancellery in Warsaw, Mr Cameron highlighted the need to address the numbers of migrants coming to the UK.
His plan would bar EU citizens from other countries from claiming in-work benefits until they had been in the UK for four years, in the belief that would deter some workers considering a move to Britain.
The issue is the main obstacle in Mr Cameron's efforts to reach a deal on his proposals, and he has indicated he would consider alternatives which would meet his aim of curbing the number of immigrants to the UK.
The reform agenda will be discussed at a summit of EU leaders next week, although Mr Cameron has conceded that no deal will be reached, meaning a potential showdown on the package could happen at the subsequent planned European Council in February.
Highlighting his concerns in a press conference in the Polish capital, Mr Cameron said: "The challenge is the scale of the vast movement of people we have seen across Europe over the last decade and the pressure that that can put on public services.
"That is the problem we need to address and I believe with the type of political will I have seen here in Poland we can find a way.
"I want Britain to stay in a reformed European Union and the prime minister has made clear that Poland wants Britain to remain in the EU."
The Polish prime minister said there was a "common direction" and she was hopeful there could be a solution that would keep the UK in the EU.
"However there are also discussions and issues about which we do not see eye-to-eye today," she added, referring to the welfare proposals.
"But I believe that these issues will be further discussed by us. We will be talking about them, we will try to solve them together in consensus."
Number 10 sources said the Prime Minister has been encouraged by the willingness shown by the leaders of Romania and Poland to engage with his reform agenda during his two-day tour.
A source said the two countries, which have seen large numbers of their citizens head to the UK, had been perceived in Britain as being "more resistant" to Mr Cameron's proposals.
But the source said the Poles "appreciated the concerns about pressures on schools and hospitals" caused by migration and were prepared to work with the UK "to find a better way to do that".
The Prime Minister repeated he would "rule nothing out" if he could not get a deal, indicating he would be prepared to recommend a British exit in the referendum promised by the end of 2017 if his renegotiations failed.
He said: "In an age of insecurity and danger and terrorism, Britain brings a lot to the European Union."
The Prime Minister warned that the wider migration crisis and the problems in the eurozone could push people in the UK towards the EU exit door, but stressed that severing ties with Brussels would not insulate Britain from the difficulties.
The number of migrants claiming asylum in the EU this year has officially passed one million, according to Eurostat, the EU's statistics agency.
"If Britain was outside the EU we would still be affected by the crisis in the eurozone. If we were outside the EU we would still be very affected by the migration crisis coming out of Syria and Africa," Mr Cameron said.
"So the question for us is, if we can get these reforms that I have set out, will we enhance British power, British prosperity, British security, the safety of British people being inside this reformed organisation or being outside it?'.
"I believe that if we can secure these reforms we will be better off inside."
He continued: "This question has become bigger and more important with the security crisis that we face in Europe. So it becomes all the more important that we work round the clock to deliver this successful renegotiation.
"I believe in the last 24 to 48 hours, with this goodwill - we don't yet have an agreement, it's going to take time - but I think there is the goodwill to reach an agreement that will be of benefit to the British people."
The Prime Minister, who praised the critical role played by "brave Polish pilots" in the Battle of Britain, also took part in a wreath-laying ceremony at the Tomb of the Unknown Soldier.