Britain will take "thousands more" refugees from camps on the borders of war-torn Syria, Prime Minister David Cameron has announced.

Speaking during a visit to Portugal, Mr Cameron said he would set out details of the plans next week.

The PM said that Britain was already "providing sanctuary" to around 5,000 refugees from the camps, and had provided around £900 million in aid - more than any other European country.

He said Britain had a "moral responsibility" to help refugees.

But he gave no indication that the UK would be willing to resettle any of the hundreds of thousands of desperate people who have made perilous Mediterranean crossings by boat to reach Europe over the past few months.

Mr Cameron said: "We have already accepted around 5,000 Syrians, and we've introduced a specific resettlement scheme alongside those we already have to help those Syrian refugees particularly at risk.

"As I said earlier this week, we will accept thousands more under these existing schemes, and we keep them under review. Given the scale of the crisis and the suffering of people, today I can announce that we will do more, providing resettlement for thousands more Syrian refugees.

"We will continue with our approach of taking them from the refugee camps. This provides them with a more direct and safe route to the United Kingdom, rather than risking the hazardous journey which has tragically cost so many their lives."

Mr Cameron said details of the scheme would be announced next week, after discussions with NGOs and other partners, and Britain would act with "our head and our heart".

The migration crisis was "the biggest challenge facing countries across Europe today", he said. Among more than 220,000 people detected crossing the Mediterranean were individuals "from different countries under different circumstances", including many Syrians fleeing the conflict in that country.

The PM said: "Britain has a moral responsibility to help refugees, as we have done throughout our history. We are already providing sanctuary and will continue to do so.

"As the second-largest bilateral donor to the crisis, we have provided over £900 million in aid to help those affected in Syria and the region. We have funded shelter, food, water, vital medical supplies for millions of desperate refugees fleeing the conflict and helping them survive in the countries around Syria, like Jordan and Lebanon.

"No European country has done more than Britain in this regard. Were it not for that massive aid, the numbers making the perilous journey to Europe today would be even higher."

He added: "Britain will continue to work with partners to tackle the conflict in Syria, to provide support to the region, to go after the smuggling gangs exploiting these people and we will continue to save lives at sea," he said.

"HMS Enterprise remains in the Mediterranean alongside the border force cutters, and together with HMS Bulwark they have now rescued more than 6,700 people.

"Britain will act with our head and our heart, providing refuge to those in need while working on long term-solutions to this crisis.

"As I said earlier in the week, this means bringing to an end the conflicts that are driving so many to flee - including the bloodbath that has engulfed Syria."

A spokeswoman for the United Nations refugee agency suggested the UK will take 4,000 more refugees from Syria - though there was no confirmation of this from Downing Street.

"We obviously welcome very much the move to increase resettlement spaces for Syrians in the UK. Those spaces are going to be critical to the lives and future of 4,000 people," said UNHCR spokeswoman Melissa Fleming, adding that there was "momentum" for other countries to follow Britain's example.

Downing Street declined to confirm or deny the 4,000 figure, saying the Prime Minister had so far specified only that the new scheme would involve "thousands" of refugees. Precise details of numbers are not expected until next week, and it is understood that the figure has yet to be finalised.

UNHCR UK representative Gonzalo Vargas Llosa welcomed Mr Cameron's announcement as a "meaningful increase" but indicated he expects the Prime Minister to be open to increasing the numbers if the situation in Syria remains grave.

Mr Vargas Llosa told the Press Association that providing safe routes from countries in the war-torn region should lead to a reduction in the number of refugees forced to risk their lives crossing the Mediterranean and Europe using traffickers.

He said: "(Mr Cameron) does say that he is keeping this issue under review and I think that it is an important expression to pick up.

"It means that this is the commitment that he is making now but it may not necessarily be the final commitment.

"I would like to draw some optimism from that expression which suggests that should the situation in Syria continue to be as dramatic and hundreds of thousands more Syrians continue to flee Syria then the UK will presumably take that into consideration, and there is a willingness to relocate more Syrians - that remains open."

Earlier, UN high commissioner for refugees Antonio Guterres said in a statement that the EU should agree a common strategy involving "all member states" to resettle as many as 200,000 migrants who have arrived in countries such as Greece.

In a statement, Mr Guterres said: "This is a defining moment for the European Union, and it now has no other choice but to mobilise full force around this crisis.

"The only way to solve this problem is for the Union and all member states to implement a common strategy, based on responsibility, solidarity and trust."

Just 216 Syrians have so far been admitted to the UK under a scheme to help the most vulnerable people in refugee camps, such as those needing significant medical treatment. Some 5,000 Syrians have been granted asylum in total in the last four years.

By contrast, Germany has accepted 35,000 Syrians through a UN scheme for vulnerable migrants, Canada more than 10,000, Australia 5,600 and Switzerland 3,500. Germany expects to take in a total of 800,000 asylum seekers through all routes this year.

Mr Cameron has come under intense pressure - including from some of his own Conservative backbenchers - to increase numbers admitted. Demands for action were heightened by shocking pictures of three-year-old Aylan Kurdi, who drowned with his brother and mother as they attempted to cross from Turkey to Greece.

Former chief rabbi Lord Sacks urged the PM to accept 10,000 refugees in "a very clear and conspicuous humanitarian gesture", which he compared to the Kindertransport programme to save Jewish children ahead of the Second World War.

The current Chief Rabbi, Ephraim Mirvis, told BBC Radio 4's Today programme: "These are real people, this is a deep and tragic humanitarian crisis and we need to provide a compassionate and responsible response."

Shadow home secretary Yvette Cooper said on Twitter: "Very important that PM has changed mind. Thanks to all who helped. Must keep pressure on to do more and help refugees in Europe as well as camps."

Liberal Democrat leader Tim Farron said Mr Cameron had been "forced kicking and screaming by public outrage" into a U-turn on his refusal to accept more refugees.

Mr Farron said he would continue to push for the UK to take "a much greater role", adding: "This plan does nothing to help the desperate families I met in Calais. Nor does it help the refugees trapped in eastern European train stations or on Greek islands."

The Refugee Council's chief executive Maurice Wren said: "It is very welcome news that the Prime Minister has announced that Britain will increase the number of Syrians we will resettle.

"We urge David Cameron to be ambitious about the scale of the increase and be thinking in the tens of thousands in order to make a significant difference to those struggling to survive in the region. Each resettlement place Britain provides will be life-changing, if not life-saving, for some of the world's most vulnerable refugees."

Ukip leader Nigel Farage said the majority of those crossing the Mediterranean were economic migrants, and that nothing should be done to encourage them to make the journey.

Speaking at the launch in London of his party's Say No campaign for the referendum on Britain's EU membership, Mr Farage said: "The EU has got this wrong. Anybody that comes, from whatever background and virtually for whatever reason, can claim to be a refugee.

"If the European Union wants to help genuine refugees, they need to establish offshore centres and process people correctly, rather than inviting what has now turned into a headlong rush."

Mr Farage warned that jihadists from the Islamic State terror group could be among those admitted into Europe, warning: "We must not allow our compassion to imperil our safety."

Shadow home secretary Yvette Cooper welcomed the extension of the UK's scheme for vulnerable refugees in Syrian camps, but added: "The British Government should also offer to help some of the refugees who have already fled into Europe.

"Fifty thousand people arrived in Greece in a month and the authorities are struggling to respond.

"Hundreds of thousands of refugees are already risking their lives trekking across Europe, boarding boats to cross the Mediterranean, or putting themselves in the hands of human traffickers out of desperation. Britain must do its bit to help those refugees too and not turn our backs."

Former Lib Dem leader Lord Ashdown accused the Prime Minister of creating a "diversion strategy" as taking more refugees from Syria's borders will not help anyone fleeing the war-torn country or putting their lives in danger in Europe.

He told BBC Radio 4's World At One programme: "We need to take very careful account of the fact that this is helping people who are already safe.

"Not a single person who is currently fleeing from the battlefield of Syria will be helped by this plan.

"Not a single person who is suffering the misery of trying get into Europe will have that misery relieved by this plan."

He added: "One has to be thankful for small mercies but this looks to me far less like a plan to do with the refugees and far more like a diversion strategy to get our minds off what's happening."