The US Congress has voted to avert a government shutdown for now - but an immigration fight still looms as Democrats demand a permanent fix to protect young undocumented immigrants - so-called “Dreamers”.

The House of Representatives and Senate voted to extend government funding - which was set to run out on Friday - for another two weeks, setting up a potential showdown over controversial issues such as immigration later this month. Multiple Democratic senators have suggested they won't vote for any long-term government funding bill unless it also includes a permanent fix for so called Dreamers.

Former President Obama had protected young immigrants brought to the US as children - known as Dreamers - by allowing them to work and learn without the threat of deportation. However, President Donald Trump has rescinded the Deferred Action for Childhood Arrivals (DACA) programme.

During an afternoon meeting with Mr Trump , House Speaker Paul Ryan and Senate Majority Leader McConnell stressed that negotiations on immigration should be held separately on a different track, and not as part of the government funding bill, according to the White House.

A readout from Press Secretary Sarah Huckabee Sanders said, “The President reiterated his priorities for ensuring any immigration package ends chain migration, constructs a border wall, and substantially strengthens immigration enforcement to stop illegal immigration and visa overstays.”

Before the start of the meeting in the Oval Office, Mr Trump stated they were all there “as a very friendly, well-unified group. It's a well-knit-together group of people.”

He added: “And we hope that we're going to make some great progress for our country. I think that will happen, and we appreciate it very much.”

Senate Minority Leader Chuck Schumer said, “We hope we can come to an agreement.”

“Funding the government is extremely important, helping our soldiers is very important, and helping average citizens is very important,” he added. “So we're here in the spirit of: let's get it done.”

House Minority Leader Nancy Pelosi said they hoped to address topics including the opioid crisis, programmes for veterans and the Children's Health Insurance Program, known as CHIP.

CHIP covers nearly nine million children whose parents earn too much for Medicaid - a healthcare programme for the those on low-incomes - but not enough to afford other coverage. Having run out of federal funding at the end of September, the programme is now in limbo.

The remarks by Mr Ryan and Mr McConnell were briefer.

“Mr President, we're here to reach a bipartisan agreement to finish out the year. And I'm glad that you invited us. I'm happy to be here.” Mr McConnell said.

Mr Ryan quickly stated: “I'm glad we're here to resume conversations,” a possible allusion to the weeks of drama and inflammatory remarks trading blame for the delay that had preceded the meeting.

The powwow was later moved from the Oval Office to the Situation Room, where the congressional leaders received a military update by Defence Secretary James Mattis.

The meeting between the top Democrats, top Republicans and Mr Trump was originally scheduled for last week. But Mr Schumer and Ms Pelosi abruptly pulled out after the President attacked them on Twitter for being "weak" and said that he didn't see how a deal could be done. Mr McConnell and Mr Ryan still attended the meeting and spoke ill of their Democratic counterparts' decision.

On Wednesday, the President told reporters a shutdown “could happen”.

“The Democrats are really looking at something that is very dangerous for our country. They are looking at shutting down,” he said. “They want to have illegal immigrants; in many cases, people that we don’t want in our country.”

Democrats say these claims are incorrect - that they don’t want a government shutdown or immigrants streaming into the country illegally.

Protests erupt after Trump recognises Jerusalem as Israel's capital Show all 22 1 /22 Protests erupt after Trump recognises Jerusalem as Israel's capital Protests erupt after Trump recognises Jerusalem as Israel's capital Supporters of Difa-e-Pakistan Council a coalition of right wing Islamic parties, burn an effigy of US President Donald Trump, during a protest in Quetta, Pakistan EPA Protests erupt after Trump recognises Jerusalem as Israel's capital Israeli police scuffle with a Palestinian protester outside Damascus Gate in Jerusalem's Old City Getty Protests erupt after Trump recognises Jerusalem as Israel's capital Palestinian protesters burn pictures of Donald Trump and Benjamin Netanyahu following Trump's decision to recognise Jerusalem as the capital of Israel, in Gaza City AFP/Getty Images Protests erupt after Trump recognises Jerusalem as Israel's capital Israeli forces disperse Palestinian protesters outside Damascus Gate in Jerusalem's Old City on 7 December 2017 AFP/Getty Images Protests erupt after Trump recognises Jerusalem as Israel's capital Supporters of the Difa-e-Pakistan Council (DPC), an Islamic organization, chant slogans as they burn Israeli and US flags during a protest against Donald Trump in Peshawar REUTERS Protests erupt after Trump recognises Jerusalem as Israel's capital Palestinians paint an 'X' over the face of a picture of US president Donald J. Trump which was painted on the Israeli separation wall in Bethlehem EPA Protests erupt after Trump recognises Jerusalem as Israel's capital Palestinian protestors burn the Israeli flag and a poster of US President Donald Trump in Gaza City AFP/Getty Images Protests erupt after Trump recognises Jerusalem as Israel's capital Supporters of a Pakistani religious party rally against Donald Trump in Lahore AP Protests erupt after Trump recognises Jerusalem as Israel's capital Palestinian protesters burn the US and Israeli flags in Gaza City AFP/Getty Images Protests erupt after Trump recognises Jerusalem as Israel's capital A poster depicting U.S. President Donald Trump is burnt during a protest against Trump's decision to recognize Jerusalem as the capital of Israel, in the West Bank city of Ramallah REUTERS Protests erupt after Trump recognises Jerusalem as Israel's capital Israeli forces detain a Palestinian protester during clashes that followed protests against US President Donald Trump recognising Jerusalem as the capital of Israel, in Hebron AFP/Getty Images Protests erupt after Trump recognises Jerusalem as Israel's capital Palestinian protesters burn an effigy of U.S. President Donald Trump AP Protests erupt after Trump recognises Jerusalem as Israel's capital Palestinian protesters shout slogans against Donald Trump EPA Protests erupt after Trump recognises Jerusalem as Israel's capital A Palestinian protester wears a Guy Fawkes mask used by the anonymous movement during clashes with Israeli troops in Hebron AFP/Getty Images Protests erupt after Trump recognises Jerusalem as Israel's capital Palestinian demonstrators clash with Isralei troops during protests AFP/Getty Images Protests erupt after Trump recognises Jerusalem as Israel's capital Supporters of a Pakistani religious party chant anti-American slogans during a rally in Islamabad, Pakistan AP Protests erupt after Trump recognises Jerusalem as Israel's capital Pakistanis burn a representation of the U.S. flag during a protest rally in Hyderabad AP Protests erupt after Trump recognises Jerusalem as Israel's capital Young Palestinian women look on as smoke billows from burning tyres as fellow Palestinian demonstrators clash with Isralei troops AFP/Getty Protests erupt after Trump recognises Jerusalem as Israel's capital Protesters burn a picture of U.S. President Donald Trump at a protest in Islamabad REUTERS Protests erupt after Trump recognises Jerusalem as Israel's capital Protestors shouts slogans against US President Donald Trump as they hold Palestinian and Turkish flags during a protest near the US Embassy in Ankara, Turkey EPA Protests erupt after Trump recognises Jerusalem as Israel's capital Palestinian protestors put their feet over a picture of US president Donald Trump during a protest in the West Bank City of Nablus EPA Protests erupt after Trump recognises Jerusalem as Israel's capital Pakistani protesters burn tires at an anti-Donald Trump rally in Multan AP

Earlier on Thursday, Ms Pelosi said Democrats will insist on safeguards for those in the DACA programme before the Christmas recess later this month.

“We will not leave here without a DACA fix,” Ms Pelosi told the newspaper The Hill.

Mr Trump announced in September that he was rescinding DACA that helped nearly 800,000 Dreamers. He gave Congress until March to figure out a solution.

There was confusion in September over whether the President had made a deal with Democrats to permanently protect Dreamers and work out a package of border security, excluding Mr Trump's oft-promised border wall.

Ms Pelosi and Mr Schumer said both sides agreed that the wall would not be part of this agreement - but that the President made clear he intends to pursue it at a later time.

Mr Trump has maintained that building a wall along the US's southern border with Mexico will prevent illegal immigration, despite scepticism from experts and even members of his own party.

Ms Pelosi emphasised on Thursday that Democrats will accept tougher border security, but not border wall funding or provisions to bolster interior enforcement.

“We said to the president the night he agreed to the DACA legislation that we have a responsibility to protect our border, and we think there are many things we can do working together to do that,” Ms Pelosi said.