Media playback is unsupported on your device Media caption Trump v Democrats on the border wall and government shutdown

President Donald Trump's standoff with Democrats over a border wall has dragged the US into the longest-ever government shutdown. Both sides appear to be dug in, so how might it end?

Mr Trump continues to call the border a national security crisis while Democrats say he is holding America hostage over an exaggerated threat.

As the nation waits for Washington to move forward, here are a few ways the situation could evolve.

The BBC's Anthony Zurcher also chips in with his thoughts and his probability rating.

1. Things get so bad that Trump caves

Airport security staff, who have been working without pay since December, have begun leaving their jobs, according to officials. Terminals in some major airports have begun experiencing delays or are closing as a result.

Food safety has also come into question as agencies struggle to operate. And on Tuesday the White House said it had doubled its estimate of the economic strain caused by the shutdown.

Mr Trump's public opinion is also suffering, according to new polling.

Anthony: There's always the possibility that the president could just throw in the towel. He did it when the heat became intolerable on his family-separation policy last year. He could do it again, if it becomes increasingly unlikely that Democrats are going to make concessions and the extended shutdown starts eating into the robust US economic growth that he frequently touts.

The big question would be whether his base would go along with this. Would they view a three-week shutdown as enough of an effort to fulfil this campaign promise?

Mr Trump would certainly take heat from conservative commentators such as Rush Limbaugh and Ann Coulter, but at some point the price of the shutdown might exceed the pain of backing down.

Chances: 20%

Image copyright Getty Images

2. Trump strikes a deal with Congress

Mr Trump has been meeting congressional leaders but last week's attempts to resolve the shutdown ended with him walking out when Democrats refused to budge.

But as it drags on, pressure is mounting on Capitol Hill.

Anthony: It's a testament to the determination of both sides in the shutdown confrontation that, for the most part, partisan ranks appear to be holding firm. A handful of Republicans in the House of Representatives have voted to reopen the government without wall funding, while the Republican leadership of the Senate has successfully squelched calls for a vote of any kind.

Meanwhile, Democrats have been steadfast - at least publicly - in their resistance to any kind of wall funding.

That deadlock may not hold for much longer, however. As the pain from the shutdown spills out beyond just the 800,000 federal employees affected into the public at large, the pressure to reach any kind of a deal is growing.

In the end the most probable deal would involve some new, vaguely worded border security funding that doesn't explicitly give the president money for his much-promised wall.

Both sides could declare victory, and both sides would be right (and wrong).

Chances: 40% and creeping up

3. The Lindsey Graham solution

Appearing on Fox News Sunday, Republican Senator Lindsey Graham suggested the president reopen the government for three weeks of negotiations. If talks are still stalled by the end, he could declare a national emergency.

The following day, President Trump appeared to reject that plan. But Mr Graham was undeterred, joining forces with other senators from both parties to draft a letter - obtained by Axios - requesting a short-term spending bill.

According to a leaked draft of the letter, the senators are requesting Mr Trump pause the shutdown "to give Congress time to develop and vote on a bipartisan agreement". It does not mention a border wall or national emergency.

Anthony: Graham is drafting a letter to the president that suggests a full debate on border security in exchange for a 30-day reopening of the government. It's an offer the president has rejected in the past - but it at least buys both sides some time (and gets federal employees their past-due paycheques).

Chances: 10%

Media playback is unsupported on your device Media caption Five questions about Trump's border wall

4. Trump declares a national emergency

If Mr Trump does invoke his presidential powers, he could bypass Congress and obtain the means for his wall through military resources.

Emergencies are usually declared in times of crisis, when the White House needs funds quickly and cannot wait for Congress to approve it.

Critics would consider this a flagrant misuse of power and both political and legal battles would ensue.

But the 1976 National Emergencies Act, which doled out unilateral authority in emergencies to presidents, as well as a court history of deferring to the president's national security decisions, could be in his favour.

Image copyright The Washington Post via Getty Images Image caption Trump holds up a photo of a 'typical standard wall design' as he speaks during a roundtable discussion on border security

Anthony Zurcher: For a while, it seemed like this would be a clever way for Mr Trump to extricate himself from the shutdown crisis. He could make the announcement to redirect existing funds to the border, sign legislation reopening the government and declare victory. Yes, the action would get bogged down in the courts, but a protracted legal fight might be a useful campaign issue in 2020.

But some Republicans have balked at the prospect of a Democratic president using emergency declarations to enact gun control, nationalised healthcare or stringent environmental regulation.

At some point Mr Trump might get so frustrated he ignores the concerns of his fellow Republicans, of course. It wouldn't be the first time.

Chances: 20% and dropping

5. The Democrats cave

Little sign of a capitulation happening, with the leadership steadfast in their refusal to bow to President Trump's demands for a wall.

Seven House Democrats accepted the president's invitation to the White House for talks on Wednesday, but their statement afterwards gave no hint of compromise.

Anthony: The parody website The Onion recently ran an article about how even Democratic Senate Minority Leader Chuck Schumer was surprised he hadn't caved yet to Republican demands. It's meant as a joke, but there's some truth to it. In the past Democrats have been more keen to seek middle ground and compromise, even when their base thought they conceding too much.

This time around, however, the Democrats have shown hardly a crack in their resistance. Mr Schumer and House Speaker Nancy Pelosi have stood almost literally arm-in-arm in their opposition to Mr Trump's demands. The rank and file have largely been quiet, even though the pain being felt by government employees - whose unions are big Democratic supporters - has been acute.

Instead, Ms Pelosi has been playing hardball, even suggesting the president should delay his high-profile State of the Union Address scheduled for later this month. Democrats are buoyed by a number of polls showing that not only is a majority of the public opposed to Mr Trump's proposal for an expanded border wall, they blame the president for the shutdown as well.

For the moment, the Democrats have the high ground in this confrontation - and they are acting like it.

Chances: 9%

6. Shutdown continues

No, it's not an ending, as such. It's the opposite of an ending, but it's a way forward - it's possible the shutdown may just carry on.

Some 800,000 federal workers missed their first paycheque this month. Many have been furloughed - temporarily laid off - but those deemed essential have been working since 22 December without pay.

Close to 50,000 workers have now been called back by the administration to work unpaid on key tasks like tax refunds and food safety.

Over the last 26 days, federal employees have shared their fears of affording rent, making credit card payments and putting food on the table. Hundreds have turned to fundraising or side-jobs to make ends meet.

Thousands of contract workers - who are not entitled to any back pay from Congress - and small businesses working closely with federal agencies have also been suffering.

Anthony Zurcher: The president has ordered tens of thousands of federal employees back to work - without pay. It's an acknowledgment that the consequences of the government shutdown are worsening and a way of alleviating some of the pain. Many Americans are anxious to get their federal tax returns, and the Internal Revenue Service is getting the manpower to handle the paperwork.

That may buy the president some time and allow the shutdown to drag on. But federal employees can't work for free forever. Some are suing the government to end this practice. Others are threatening to call in sick or quit en masse.

The shutdown may stretch on, but it can't continue forever.

Chances: 1%