Donald Trump has announced that a short-term deal to reopen the federal government has been reached without allocating funds for his promised border wall, marking an end to the longest governement shutdown in US history.

After nearly 35 days without a fully functioning government, the president announced in a rambling speech from the White House Rose Garden that a deal has been made with congressional leadership to reopen the federal government for three weeks.

The deal leaves negotiations over Mr Trump’s requested $5.7bn (£4.3bn) to build a wall on the southwest US border for another day, and the president challenged Democrats and Republicans to work together to come up with a deal in the next 21 days to combat the flow of illicit substances coming into the United States.

“I am very proud to announce today that we have reached a deal to end the shutdown and reopen the federal government” Mr Trump said during his speech.

The deal will reopen the government until 15 February. In the meantime, the 800,000 furloughed or unpaid government employees will receive back pay. It is unclear if federal contractors who did not receive pay cheques during the shutdown will receive back pay.

Trump shuts down US government over Mexico border wall – in pictures Show all 15 1 /15 Trump shuts down US government over Mexico border wall – in pictures Trump shuts down US government over Mexico border wall – in pictures Federal workers and contractors rally against the partial federal government shutdown Getty Images Trump shuts down US government over Mexico border wall – in pictures The US Capitol on the first morning of a partial government shutdown in Washington EPA Trump shuts down US government over Mexico border wall – in pictures Federal workers and contractors rally against the partial federal government shutdown Getty Trump shuts down US government over Mexico border wall – in pictures President Trump speaks with children who called the North American Aerospace Defense Command Santa tracker in the State Dining Room of the White House. He earlier in the day, tweeted that he was 'all alone in the White House' waiting for Democrats to make a deal on border security EPA Trump shuts down US government over Mexico border wall – in pictures Furloughed federal workers pick up free food at a pop-up store of Kraft Heinz Getty Images Trump shuts down US government over Mexico border wall – in pictures Hundreds of federal workers and contractors rally against the partial federal government shutdown Getty Trump shuts down US government over Mexico border wall – in pictures A pedestrian walk past the U.S. Capitol ahead of a possible partial government shut down in Washington, U.S., December 20, 2018. REUTERS/Joshua Roberts JOSHUA ROBERTS Reuters Trump shuts down US government over Mexico border wall – in pictures From left, House Majority Leader Steny Hoyer, Senate Minority Leader Chuck Schumer, Sen. Dick Durbin and Speaker of the House Nancy Pelosi walk to speak to reporters after meeting with President Donald Trump about border security in the Situation Room of the White House. Trump declared he could keep parts of the government shut down for "months or even years" as he and Democratic leaders failed in a second closed-door meeting to resolve his demand for billions of dollars for a border wall with Mexico Evan Vucci AP Trump shuts down US government over Mexico border wall – in pictures Federal workers and contractors rally against the partial federal government shutdown Getty Images Trump shuts down US government over Mexico border wall – in pictures A sign alerts visitors to the closure of the National Archives on the fifth day of a partial government shutdown EPA Trump shuts down US government over Mexico border wall – in pictures Hundreds of federal workers and contractors rally against the partial federal government shutdown Getty Images Trump shuts down US government over Mexico border wall – in pictures Visitors read signs announcing the closure of the White House Visitor Center EPA Trump shuts down US government over Mexico border wall – in pictures President Donald Trump speaks during a round-table discussion on border security and safe communities with State, local, and community leaders in the Cabinet Room of the White House Getty Images Trump shuts down US government over Mexico border wall – in pictures A sign alerts visitors to the closure of the White House Visitor Center on the first day of a partial government shutdown EPA Trump shuts down US government over Mexico border wall – in pictures Furloughed federal workers show their IDs for entering a pop-up store of Kraft Heinz Getty Images

Mr Trump’s capitulation follows after the Republican-controlled Senate voted on two bills on Thursday that would have reopened the government if approved, one with Mr Trump’s border funding, and the other without.

Neither bill mustered enough votes to overcome the 60 vote cloture requirement for approval, but, in a rebuke to the president, the Democrat-supported funding bill that did not include border funding received more support than the president’s proposal after half a dozen Republicans crossed party lines to vote in favour of that legislation.

“We’re grateful to Democrats on both sides of the aisle for their unity that was very, very important in these discussions. It’s sad, though, that it’s taken this long to come to an obvious conclusion ... Disagreement in policy should never be a reason to shut down the government”, Nancy Pelosi, speaker of the house, said during a press conference alongside Senate Minority Leader Chuck Schumer following the president’s announcement.

Mr Schumer, meanwhile, pledged that Congress would work with the president on border security. Mr Schumer and Ms Pelosi has rejected the $5.7bn request for a wall from the president, but has offered $1.3bn in border security funding before the shutdown.

“The longest shutdown in American history will finally end today,” Mr Schumer said. “The president has agreed to our request to open the government and then debate border security.”

He continued: “We in Congress will roll up our sleeves and try to find some agreement on border security ... Democrats are firmly against the wall, but we agree on many things such as the need for drug inspection technology, humanitarian aid, strengthening security at ports of entry”.

Both House and Senate passed a measure formalising the 21-day reprieve, sending it to Mr Trump's desk for signing.

During his Rose Garden speech, Mr Trump said that he hoped leaders in Congress will be able to negotiate a funding package that he views as adequate to ensure border security. After weeks in which he kept the government shut while demanding billions for a border wall, the president said that he does not believe a physical, concrete wall needs to be constructed along the entire border. He said in some portions, for instance, natural barriers make a wall unneceessary.

Arguing his case for smart infrastructure to secure America’s border – such as state of the art drones and other technologies – Mr Trump said: “The walls we are building are not medieval walls. They are smart walls designed to meet the needs of frontline border agents and are operationally effective”.

“We do not need 2,000 miles of concrete wall from sea to shining sea, we never did,” Mr Trump continued, amending his blanket statements from rallies and public remarks in the past. “We never proposed that. We never wanted that, because we have barriers at the border where natural structures are as good as anything that we can build”.

In anticipation of a future quagmire, Mr Trump signalled that he may resort to alternative measures to get what he wants if Congress cannot bow to his demands.

Later, during remarks in the White House, the president said that he would “do the emergency” if there is no deal made to build a border wall.

In a tweet he claimed he had not conceded ground to his opponents. “I wish people would read or listen to my words on the Border Wall. This was in no way a concession. It was taking care of millions of people who were getting badly hurt by the Shutdown with the understanding that in 21 days, if no deal is done, it’s off to the races!” he said.

Trump says he will declare a national emergency if no deal is reached on border wall

Just hours after it was reported by CNN that the White House was considering options for a state of emergency to reallocate federal funds to build the border wall without congressional approval, the president signalled he was considering his choices.

“We really have no choice but to build a powerful wall or steel barrier”, Mr Trump said in the Rose Garden. “If we don’t get a fair deal from Congress, the government will either shut down on February 15, or I will use the powers afforded to me under the laws and the Constitution of the United States to address this emergency. We will have great security.”

Support free-thinking journalism and attend Independent events

Support free-thinking journalism and subscribe to Independent Mindse laws and Constitution of the United States to address this emergency”.

To make the case for the necessity of that wall – whether he gets it through congressional approval or through other means – the president described a humanitarian crisis at the border. He said that human trafficking is “the biggest problem” and that human trafficking is at its worst level “in the history of the world”.

“Women are tied up, they’re bound, duct tape put around their faces, around their mouths. In many cases they can’t even breath,” Mr Trump said. “They’re put in the back of cars or vans or trucks. They don’t go through your port of entry. They make a right turn going very quickly. They go into the desert areas or whatever areas you can look at and as soon as there’s no protection, they make a left or a right into the United States of America. There’s nobody to catch them. There’s nobody to find them”.

He continued: “They can’t come through the port, because if they come through the port people will see four women sitting in a van with tape around their face and around their mouth. Can’t have that.”

While the president described the 21-day deal on Fridady as a shining example of bipartisan deal making, Mr Trump has been dealt some significant blows this week as the impacts of the shutdown spread.

Public support for the president has dropped, with an increasing number of Americans blaming Mr Trump and the Republican Party for the shutdown that has left some 800,000 federal workers without paychecks this month. In a Washington Post/ABC News poll released on Friday, 58 per cent of Americans said that they disapprove of the job Mr Trump is doing as president, a jump of 5 per cent over three months.

In addition to the defeat on the Senate floor on Thursday, the president also suffered a significant blow on the same day after Nancy Pelosi called his bluff and told him he could not deliver the yearly State of the Union until the shutdown is ended. That speech was scheduled for Tuesday.

The deal between the White House and Congress marks a stunning break in a stalemate that has harmed national security while leaving hundreds of thousands of government employees struggling to make mortgage payments, pay for child care, and even fill up their cars with petrol to drive to their unpaid jobs.

As the shutdown proceeded, a statement from the FBI Agents Association on Thursday argued that national security has been impacted by the shutdown because “financial security is national security”. On Friday, major disruptions at three major US airports were seen, with flights halted or grounded at New York’s LaGuardia International Airport, Newark International Airport, and Philadelphia International Airport.

Economists believe the partial government shutdown will end up having only a minor impact on the overall economy as long as the government stays open, according to the Associated Press.

Paul Ashworth, chief US economist at Capital Economics, told the AP the impact should end up being “barely significant” with economic growth coming at a moderate 2 per cent.

Mark Zandi, chief economist at Moody’s Analytics, said meanwhile that he looks for first-quarter growth to be around 2.3 per cent, down slightly from the 2.5 per cent forecast if the shutdown had not happened.