The US shutdown has been called off as Democrats and Republicans agreed to a short-term funding bill.
It came with conditions: Democrats agreed only after Republicans promised a debate on the status of 'Dreamers.'
But this arrangement will be in place only till February 8, when a new budget will have to be passed.
So who won? Republicans? Democrats? Donald Trump? Here's a look.
US shutdown ends in two days
What led to the government shutdown
On January 20, the US entered its 19th shutdown as the Senate failed to pass a funding bill to keep the government running.
The key difference among the parties was on Dreamers, who arrived in the US as children.
Democrats wanted protection for the 700,000 Dreamers and a permanent extension for the children's health insurance program.
Trump, meanwhile, wanted tougher border controls.
The Republicans' aggressive attack on the Democrats
Republicans decided to place the entire blame on Democrats. Trump had earlier tweeted: "...Dems want a Shutdown in order to help diminish the great success of the Tax Cuts..."
More unusually, the White House changed its message on the public feedback line: "Unfortunately, we cannot answer your call today because Congressional Democrats are holding government funding...hostage to an unrelated immigration debate."
Love World news?
Stay updated with the latest happenings.
The end of the shutdown
The shutdown was called off after Republican leader Mitch McConnell assured negotiations on an immigration deal.
The bill was passed in the Senate 81-18 and the House of Representatives by 266-150.
However, potential Democratic presidential candidates including Elizabeth Warren and Bernie Sanders voted against.
This is the fourth temporary measure since October; Capitol Hill hasn't been able to agree on a longer-term budget.
What did the Republicans gain, what did they lose?
Unlike previous times, the Republicans emerged relatively unscathed. Their caucus stayed reasonably united.
Moreover, if the promised immigration deal happens, the party will please at least some Republicans who too want protection for Dreamers.
However, Trump, who faced criticism over his "inactivity," is likely to stick to his border control demands.
Snap polls showed dwindling support for Republicans, which might affect the mid-term elections.
The Democrats showed a rare confrontational side
As for the Democrats, the caucus stuck together. Despite seemingly "backing down," they have a chance to put up a tougher fight, and force another shutdown, in three weeks.
Their confrontational attitude might just win the liberal base's support.
But it didn't take time for "Democrats CAVED" to trend. The sentiment was shared by some Democrats themselves, like Congressman Luis Gutierrez.
MP CM Shivraj Chouhan hits man, BJP defends as "reflex"
US government in shutdown after funding bill fails to pass