Last ditch talks between President Donald Trump and the Senate’s top Democrat to try and avoid a government shutdown have failed to produce a deal, leaving just hours to find a solution.

The Senate has until midnight on Friday (5am Saturday GMT) to pass a short-term spending bill to avert a shutdown for four more weeks – but the possibility was getting more remote as night fell. The measure has already been approved by the House of Representatives.

An evening – and possibly a weekend – of drama is expected in the closely divided upper chamber, where Democrats have already indicated they have enough support to block the spending legislation, as they seek a deal over immigration reform.

Chuck Schumer, Senate Minority Leader, said after his meeting with Trump: “We had a long and detailed meeting. We discussed all of the major outstanding issues. We made some progress, but we still have a good number of disagreements. The discussions will continue.”

The president was more upbeat in his tweet following the talks, citing an “excellent preliminary meeting” as he pushed a four-week extension.

Mr Trump had earlier suggested that a shutdown might be inevitable as Democrats “want illegal immigration and weak borders”.

“Government Funding Bill past last night in the House of Representatives,” Mr Trump tweeted on Friday morning. “Now Democrats are needed if it is to pass in the Senate – but they want illegal immigration and weak borders. Shutdown coming? We need more Republican victories in 2018!”

In a later tweet, Mr Trump quoted Democratic Senator Dianne Feinstein telling CNN on Thursday that “shutting down the government is a very serious thing. People die, accidents happen” as he sought to push the blame for any shutdown onto the Democrats.

“You don’t know. Necessary functions can cease,” Ms Feinstein said in the interview. “There is no specific list you can look at and make a judgment: ‘Well everything is going to be just fine.’ You can’t make that judgment. So, I think it’s a last resort. And I’m really hopeful we don’t get to it.”

An ABC News/Washington Post poll released on Friday suggested that Republicans may bear the brunt of political damage if a shutdown occurs. Forty-eight per cent of the more than 1,000 people polled nationally, said they would blame Mr Trump and Republicans, while 28 per cent would blame Democrats. An additional 18 per cent said they would blame both parties equally.

Rather than heading to Florida on Friday evening as originally planned, Mr Trump will be staying in Washington until after the Senate’s vote on the spending bill.

It is uncertain whether Mr Trump, who has billed himself as the ultimate dealmaker, will be able to craft the ultimate deal to save his presidency from making history. Never before has the government experienced a furlough of federal employees when a single party controls both the White House and Congress.

Republicans hold a 51-49 seat advantage in the Senate, but require 60 votes for the spending measure to pass, meaning that they need Democratic support.

The conflict is coinciding with the one-year anniversary of Mr Trump’s presidency and could have lasting repercussions, particularly regarding this year’s midterm elections in November.

White House Budget Director Mick Mulvaney told reporters on Friday morning that the chances of a shutdown were between 50 and 60 per cent.

“We’ve had our meeting just about a half an hour ago, a teleconference with a bunch of agencies to tell them to start to implement their lapse plan, the next step in preparing for a lapse in funding, that’s what we call a shutdown, the formal name of it,” he said. “I guess the bottom line is we’re working to make sure there is no shutdown but if the Senate or the House can’t get together to finalise a deal we’ll be ready.”

Mr Mulvaney noted that members of the House would likely be leaving Washington on Friday until next week, “so if the Senate passes anything else than what the House has passed you could wind up in a short-term lapse in funding”.

Donald Trump's first year: in pictures Show all 29 1 /29 Donald Trump's first year: in pictures Donald Trump's first year: in pictures Inauguration - 20 January 2017 US President Donald Trump acknowledges the audience after taking the oath of office as his wife Melania (L) and daughter Tiffany watch during inauguration ceremonies swearing in Trump as the 45th president of the United States on the West Front of the US capital in Washington on 20 January, 2017. Photographer Jim Bourg: "This photo was shot with one of two remote cameras. The cameras were monitored and triggered remotely and the pictures were transmitted to clients worldwide within minutes of being taken." Reuters/Jim Bourg Donald Trump's first year: in pictures Obama farewell address - 10 January 2017 US President Barack Obama wipes away tears as he delivers his farewell address in Chicago on 10 January, 2017. Photographer Jonathan Ernst: "In his final days in office, Obama made a visit home to Chicago. As he spoke from the stage to his wife and daughter in the audience, he became emotional when he talked about what they had sacrificed during his time in office. I turned from photographing the Obama women embracing to find him onstage wiping away tears." Reuters/Jonathan Ernst Donald Trump's first year: in pictures Inauguration - 20 January 2017 A combination of photos shows the crowds attending the inauguration ceremonies to swear in U.S. President Donald Trump at 12:01pm (left) on January 20, 2017 and President Barack Obama sometime between 12:07pm and 12:26pm on January 20, 2009. Reuters/ Lucas Jackson/Stelios Varias Donald Trump's first year: in pictures Liberty Ball - 20 January 2017 US President Donald Trump and first lady Melania Trump attend the Liberty Ball in honour of his inauguration in Washington on 20 January, 2017. Photographer Jonathan Ernst: "What I see when I look at this picture is the end of a very long day, not to mention weeks and months of preparation by many photographers, editors and network experts and the beginning of everything since." Reuters/Jonathan Ernst Donald Trump's first year: in pictures Inaugural Law Enforcement Officers and First Responders Reception - 22 January 2017 US President Donald Trump greets Director of the FBI James Comey as Director of the Secret Service Joseph Clancy (L), watches during the Inaugural Law Enforcement Officers and First Responders Reception in the Blue Room of the White House on 22 January, 2017. Photographer Joshua Roberts: "I have covered the White House for 16 years and normally either the President or the pool is in position when an event starts. In this case the President was not where anyone expected him to be. In fact, he was almost blocking the door when the pool came in. We had to scramble to find a position without bumping him or the furniture as he greeted and thanked members of law enforcement for their security efforts during the inauguration. Luckily, he greeted FBI Director James Comey a few seconds after the pool had made its way into the room." Reuters/Joshua Roberts Donald Trump's first year: in pictures Private phone calls to world leaders - 28 January 2017 US President Donald Trump, is joined by his staff, as he speaks by phone with Russia's President Vladimir Putin in the Oval Office on 28 January, 2017. Photographer Jonathan Ernst: "Very early in the Trump administration, weekends were as busy as weekdays. On Trump's second Saturday the official schedule said he would be making private phone calls to a number of world leaders including Russia's Vladimir Putin. I arrived early and, before sitting down at my desk walked up to Press Secretary Sean Spicer's office. He, too, was just taking his coat off. I gingerly made the suggestion that previous administrations had sometimes allowed photos of such phone calls through the Oval Office windows on the colonnade. To my mild shock, he didn't even think about it twice. "We'll do it!" he said. In truth, I really only expected the Putin call, but we were outside the windows multiple times throughout the day as the calls went on." Reuters/Jonathan Ernst Donald Trump's first year: in pictures Senior advisor Kellyanne Conway - 27 February 2017 Senior advisor Kellyanne Conway (L) attends as US President Donald Trump welcomes the leaders of dozens of historically black colleges and universities (HBCU) in the Oval Office on 27 February, 2017. Photographer Jonathan Ernst: "We're often asked how much access we have to the Trump administration, and the answer is we have an awful lot. President Trump himself is very comfortable in the spotlight, and his aides are similarly unfazed by cameras. In this instance, senior advisor Kellyanne Conway was so comfortable in our presence she seemed not to consider the optics of kneeling on a Oval Office sofa to take pictures with her phone." Reuters/Jonathan Ernst Donald Trump's first year: in pictures Angela Merkel heads to Washington - 17 March 2017 Germany's Chancellor Angela Merkel and US President Donald Trump hold a joint news conference in the East Room of the White House on 17 March, 2017. Photographer Jonathan Ernst: "Chancellor Merkel made one of the earliest important visits of any US allies to meet Trump in his first months in office. When world leaders give joint news conferences they don't always tend to give each other their full attention - but Merkel watched Trump intently at several key moments, and here seemed particularly rapt." Reuters/Jonathan Ernst Donald Trump's first year: in pictures Trump welcomes truckers to the White House - 23 March 2017 President Trump reacts as he sits on a truck while he welcomes truckers and CEOs to attend a meeting regarding healthcare at the White House on 23 March, 2017. Photographer Carlos Barria: "The White House organised a listening session with truckers and CEO's of major American companies, regarding healthcare reform. An 18-wheeler tow truck was parked on the South Lawn of the White House and as Trump welcomed the truckers someone invited the him to come and sit in the driver's seat. Trump jumped into the cab and started yelling and pretending to drive - creating one of the most memorable pictures of the year. A lesson learned, always be prepared for the unexpected." Reuters/Carlos Barria Donald Trump's first year: in pictures Air Force One - 6 April 2017 US President Donald Trump talks to journalists members of the travel pool on board the Air Force One during his trip to Palm Beach, Florida on 6 April, 2017. Carlos Barria: "During the many trips to President Trump's residence in Florida it is usual to see the president coming to the back of the plane to chat with journalists. During one of the trips to the so called 'Winter White House', Trump had a long talk with reporters while the Air Force One entertainment system was playing one of the latest Star Wars movies. As I was listening to Trump talk I was also looking at the movie waiting for a part of the movie to frame the mood of the day. Of the many scenes, I choose the one with Darth Vader." Reuters/Carlos Barria Donald Trump's first year: in pictures 100 Days - 27 April 2017 US President Donald Trump speaks during an interview with Reuters in the Oval Office of the White House on 27 April, 2017. Photographer Carlos Barria: "A day before President Trump's hundred days in office I was part of the team that interviewed the commander-in-chief in the Oval Office. I was only allowed to photograph Trump during the last five minutes of the interview. The time was very tight so I had to move fast as I had pictures in mind that I wanted to shoot. I walked into the Oval Office and saw that the President had printed maps of the country showing areas in red where he won. I raised my hands holding my camera as high as possible to get the best view of the scene using a 16mm wide angle lens." Reuters/Carlos Barria Donald Trump's first year: in pictures 100 Days - 27 April 2017 US President Donald Trump reacts as he arrives at Harrisburg international airport, before attending a rally marking his first 100 days in office in Pennsylvania on 29 April, 2017. Photographer Carlos Barria: "President Trump travelled to Harrisburg, Pennsylvania to celebrate his hundred days in office with a victory rally. He was in friendly territory as he won with a big difference over his opponent Hillary Clinton in Pennsylvania, during the November elections. As usual when the commander-in-chief arrives local residents gather to greet him. This time a small group of military personnel attended the arrival. Surrounded by secret service agents Trump walked from the Air Force One and raised his hand in a sign of victory as the crowd cheered him on." Reuters/Carlos Barria Donald Trump's first year: in pictures White House staffers - 2 May 2017 White House Press Secretary Sean Spicer (L) and White House Chief of Staff Reince Priebus watch as US President Donald Trump presents the U.S. Air Force Academy football team with the Commander-in-Chief trophy in the Rose Garden of the White House in Washington on 2 May, 2017. Photographer Joshua Roberts: "Covering the White House does not just mean covering the President. White House staffers are an important part of the story and their relationship with the President and each other is an indicator of how things are going in the West Wing. The tendency is to focus exclusively on the President once an event starts but I always try to look around to see how people are reacting as things unfold." Reuters/Joshua Roberts Donald Trump's first year: in pictures Secret Service - 4 May 2017 Secret Service agents use a presidential limousine as cover from spraying water as US President Donald Trump lands via Marine One helicopter in New York on 4 May, 2017. Photographer Jonathan Ernst: "The best part of any trip to New York City with the sitting US President is the helicopter ride into Manhattan. The ride out at night can be stunning. Here, Secret Service agents protect themselves from the spray from the East River as Trump lands on the helipad." Reuters/Jonathan Ernst Donald Trump's first year: in pictures NATO Summit - 25 May 2017 US President Donald Trump and first lady Melania Trump wait the arrival of French President Emmanuel Macron (unseen) before a lunch ahead of a NATO Summit in Brussels on 25 May, 2017. Photographer Jonathan Ernst: "One of the best parts of travelling overseas for White House coverage is the chance to see the U.S. president in different environments and (literally) a different light. Here, Trump and his wife came out of the shadows to greet France's President Macron." Reuters/Jonathan Ernst Donald Trump's first year: in pictures Trump meets Putin at G20 summit - 7 July 2017 US President Donald Trump meets with Russian President Vladimir Putin during their bilateral meeting at the G20 summit in Hamburg, Germany on 7 July, 2017. Photographer Carlos Barria: "On July 7, I witnessed one of the most important meetings of President Trump's first year in office. Trump met Russian President Vladimir Putin during a bilateral meeting at the G20 summit in Germany. The world's eyes were on these two leaders after speculation about Russian interference during the 2016 US elections. We entered the room for less than two minutes, where I took dozens of pictures. But there was this very interesting moment when Trump extended his hand to Putin for a handshake. Putin paused for a second and looked at Trump's hand. That was the picture that I was looking for, a little moment that seemed to say a lot." Reuters/Carlos Barria Donald Trump's first year: in pictures First lady - 8 July 2017 First lady Melania Trump chats with US President Donald Trump during their return from Germany at Joint Base Andrews, Maryland on 8 July, 2017. Photographer Carlos Barria: "After President Trump's trip to Germany he arrived back at Joint Base Andrews, Maryland. First Lady Melania Trump said goodbye to Trump as she was heading off in a different direction that day. While chatting a breeze blew Melania's hair up in the air." Reuters/Carlos Barria Donald Trump's first year: in pictures Made in America product showcase - 17 July 2017 Vice President Mike Pence laughs as President Donald Trump holds a baseball bat as they attend a Made in America product showcase event at the White House on 17 July, 2017. Photographer Carlos Barria: "This summer the White House organized an event to showcase 'Made in America' products. All kinds of exhibitors brought their products as the President and Vice President toured the event. One of the companies was Marucci Sport, a manufacturer of baseball bats based in Baton Rouge, Louisiana. As Trump approached a table full of baseball bats, photographers at the event, including me, rushed to get a good angle hoping that he would pick up a bat. As we predicted, he did. He took one and joked around as though he was hitting something hard. The only thing closer to him right there, was the media." Reuters Donald Trump's first year: in pictures White House staffers - 25 July 2017 Former campaign manager Corey Lewandowski says hello to reporters as he and White House advisors including Communications Director Anthony Scaramucci accompany President Trump for an event celebrating veterans at AMVETS Post 44 in Ohio, July 25, 2017. Jonathan Ernst: "The most visible person in any White House is naturally the President, followed by the press secretary. But there are also the staff who support them. For those of us covering the Trump administration, there seem to be more compelling figures in the West Wing than ever before. It's crucial to know who's who and why they're important. When I raised my camera and back-pedalled ahead of the group to take this image Lewandowski gave me a hello. I liked the photo, but had no idea it would go a little bit viral, especially since Scaramucci, who was the biggest mover and shaker that week, was hidden back in the pack. But I guess the image catches a glimpse of what it's like to be a West Wing staffer on the road." Reuters/Jonathan Ernst Donald Trump's first year: in pictures Campaign rally - 3 August 2017 US President Donald Trump arrives at a rally in West Virginia on 3 August, 2017. Photographer Carlos Barria: "President Trump travelled to Huntington for one of his usual campaign rallies. While members of his family spoke to the crowd he was waiting under a black curtain to be introduced. Suddenly he walked onto the stage, one of the first frames that I took was of his hand. I set my exposure for the light on the stage hoping to create this dark background and it worked." Reuters/Carlos Barria Donald Trump's first year: in pictures Staring into the solar eclipse - 21 August 2017 Without his protective glasses on, US President Donald Trump looks up towards the solar eclipse while viewing with his wife Melania and son Barron at the White House on 21 August, 2017. Photographer Kevin Lamarque: "On a day when everyone, and I mean everyone, was told not to look at the eclipse without protective glasses, Trump, President of the United States, couldn't help himself." Reuters/Kevin Lamarque Donald Trump's first year: in pictures Hurricane Harvey - 2 September 2017 US President Donald Trump poses for a photo as he and first lady Melania Trump help volunteers hand out meals during a visit with flood survivors of Hurricane Harvey at a relief centre in Houston, Texas on 2 September, 2017. Photohrapher Kevin Lamarque: "Trump, eager to deliver the image of a hands-on response to Hurricane Harvey, made this visit to a relief centre and obliged this woman with a selfie as Melania continued to work." Reuters/Kevin Lamarque Donald Trump's first year: in pictures White House - 15 September 2017 Donald Trump welcomes 11-year-old Frank Giaccio as he cuts the Rose Garden grass at the White House on 15 September. Frank, who wrote a letter to Trump offering to mow the lawn, was invited to work for a day at the White House along the National Park Service staff. Frank was so focused on his task that he did not notice the President arrive to surprise him. He took his father jumping in to grab his attention and point Trump out. Photographer Carlos Barria said: “The image of Trump shouting at a kid who is mowing his lawn might have many interpretations in today's politically polarized United States. But for me it was just a kid who loved what he was doing, to the point he almost appeared to ignore the President." Reuters/Carlos Barria Donald Trump's first year: in pictures Take a knee - 27 September 2017 A man kneels with a folded U.S. flag as the motorcade of U.S. President Donald Trump passes him after an event at the state fairgrounds in Indianapolis, Indiana, U.S., September 27, 2017. In September, soon after Trump had made comments condemning NFL players who kneel during the national anthem, he made a day trip to a rally in Indianapolis. Jonathan Ernst managed to capture a man on one knee with a tri-folded flag and was able to use a portion of the sign on the building he was kneeling in front of to track the man down and tell his story in full. US Army veteran Marvin Boatright wanted to send a message against social injustice. Reuters/Jonathan Ernst Donald Trump's first year: in pictures Hurricane Maria - 3 October 2017 President Donald Trump throws rolls of paper towels into a crowd of local residents affected by Hurricane Maria as he visits Calgary Chapel in San Juan, Puerto Rico on 3 October, 2017. Photographer Jonathan Ernst: "During an afternoon visit to Puerto Rico for President Trump to survey damage from Hurricane Maria and greet some of its victims, Trump made a stop at a church where food and supplies were being distributed. Among the items were paper towels and Trump, apparently caught up in the moment, decided to distribute some of the rolls." Reuters Donald Trump's first year: in pictures Jared Kushner - 1 November 2017 White House Senior adviser Jared Kushner sits behind President Trump during a cabinet meeting in Washington on 1 November, 2017. Photographer Kevin Lamarque: "The role of Jared Kushner has gone through a series of changes. He began front and centre as a high profile adviser, but as time has passed and issues surrounding him have surfaced, he has become more of a background figure." Reuters/Kevin Lamarque Donald Trump's first year: in pictures Trump in China - 9 November 2017 Donald Trump and China's President Xi Jinping shake hands after making joint statements at the Great Hall of the People in Beijing on 9 November, 2017. Photographer Damir Sagolj: "It's one of those "how to make a better or at least different shot when two presidents shake hands several times a day, several days in row". If I'm not mistaken in calculation, presidents Xi Jinping and Donald Trump shook their hands at least six times in events I covered during Trump's recent visit to China. I would imagine there were some more handshakes I haven't seen but other photographers did. And they all look similar - two big men, smiling and heartily greeting each other until everyone gets their shot. But then there is always something that can make it special - in this case the background made of US and Chinese flags. The first time it didn't work for me. The second time I positioned myself lower and centrally, and used the longest lens I have to capture only hands reaching for a handshake." Reuters/Damir Sagolj Donald Trump's first year: in pictures Air Force One - 10 November 2017 US President Donald Trump boards Air Force One to depart for Vietnam from Beijing Airport in Beijing, China, November 10, 2017. Photographer Jonathan Ernst: "There is a Reuters photographer in the tight pool covering the US president for every appearance he makes 365 days a year. This was just one of 32 images of mine that were transmitted on the Reuters wire of President Trump visiting China and Vietnam that day. You never know when a sudden interaction, a gust of wind or a unique facial expression will lead to a striking image that grabs peoples' attention." Reuters/Jonathan Ernst Donald Trump's first year: in pictures ASEAN handshake - 13 November 2017 Donald Trump registers his surprise as he realises other leaders, including Russia's Prime Minister Dmitry Medvedev, Vietnam's Prime Minister Nguyen Xuan Phuc, President of the Philippines Rodrigo Duterte and Australia's Prime Minister Malcolm Turnbull, are crossing their arms for the traditional "ASEAN handshake" as he participates in the opening ceremony of the summit in Manila on 13 November, 2017. Photographer Jonathan Ernst: "Having covered a few ASEAN summits, I knew to expect the ASEAN handshake. Not everyone in the room knew to expect the ASEAN handshake. A lot was written about this unscripted moment, and what deeper meaning it might have. The simple truth is that sometimes in life there are unscripted moments." Reuters/Jonathan Ernst

Nine Senate Democrats who voted for another short-term spending measure in December have said they won’t support the latest proposed bill to fund the government for another four weeks. Their decision puts them in the same boat as 30 other Democrats and at least two Senate Republicans who have also said they won’t vote for the measure.

In an attempt to deter Democrats from voting against it, Republican leaders had added a provision to the spending bill that would extend the popular Children’s Health Insurance Program (CHIP) for six years.

Democrats had fought to continue federal funding for the programme that serves nearly 9 million children. Federal financing for it expired in October and several states are close to exhausting their money.

Several have also made it clear they will not consider voting for another spending measure unless they receive assurances that there will be a permanent legislative fix for the Deferred Action for Childhood Arrivals programme, or DACA. The programme, which expires in March, allows young immigrants brought into the country illegally by their parents to secure work permits and deportation reprieves.

In a press briefing, Mr Mulvaney said DACA legislation “is simply not ready” and that it’s unnecessary to tie it to the spending bill.

“As you see with any major piece of legislation, it doesn’t and shouldn’t come together overnight,” Mr Mulvaney said. “There’s no DACA bill to vote on and there’s no emergency in terms of the timing on DACA. DACA does not expire until March 5th. So there’s absolutely no reason to tie these two things together right now.”

Negotiations on any immigration deal have been complicated by Mr Trump’s commitment to build a wall along the US’s southern border – a barrier that Democrats vehemently oppose and would cost billions of dollars to construct. The President maintains that the US needs the wall for safety and security reasons.

Democrats also want concessions from Republicans on Puerto Rico aid and an increase in domestic spending, among other items, according to the New York Times.

Congress has already passed multiple short-term spending bills, known on Capitol Hill as “continuing resolutions” – or CRs – to try to keep negotiations on immigration and other tough issues alive.

But Democratic appetite for passing these CRs appears to have waned, with party members saying more focus should instead be placed on hammering out a longer-term budget deal.

“It’s a mess,” Mr Schumer said. “We can’t keep careening from short-term CR to short-term CR. If this bill passes, there will be no incentive to negotiate and we will be right back here in a month with the same problems at our feet.”

Senate Majority Leader Mitch McConnell said his colleagues “on the other side of the aisle do not oppose a single thing in this bill”.