Seven months after former President Barack Obama was sworn in for his second term, House Republicans, with a shove from Sen. Ted Cruz, faced down the White House with an ultimatum: Sign off on legislation that delays or defunds the Affordable Care Act or risk a government shutdown.

Obama refused, unsurprisingly, to cut the legs out from under the law he'd spent the first year of his presidency -- and all the political capital that came with it -- selling to lawmakers on Capitol Hill, including dozens of Democrats who would lose their seats in part because of their support for the controversial overhaul.

In the end, the shutdown lasted 16 days -- the longest and most costly in American history. And for almost all of them, future President Donald Trump was tweeting and talking, keeping up a drumbeat urging Republicans to stick together and do everything in their power to stop Obamacare, while skewering Obama as a weak leader and incompetent negotiator.

Cheering on the Republicans

In the weeks leading up to the shutdown, the Republican-held House passed a bill that would have cut funding for the health care law while keeping the government open through December 15. The Democratic-held Senate rejected the House legislation, but not before Cruz launched a lengthy Senate floor filibuster of the vote. On September 27, the Senate passed the House bill -- minus the Obamacare defunding bit.

Days later, the House approved another bill, this one delaying the law by a year. The two chambers would go back-and-forth a few more times, but the impasse remained. On Tuesday morning, October 1, the shutdown began.

Play-by-play of the shutdown

On October 11, Trump appeared on CNN for an interview with Piers Morgan.

First he offered Obama some advice.

"I mean you just have a President that is not leading and not getting people into a room and not shouting, and cajoling, and laughing, and having a good time, and having a terrible time," he said. "But, you know, all of these different emotions are things you have to do but you have to get people in a room and you have to just make deals for the good of the country."

Trump, of course, has held at least a couple of bipartisan meetings -- for better or much, much worse.

Asked about the tea party and Cruz, who agitated for the House to hold up funding, Trump praised their tactics.

"I'm a believer in the tea party, because what they want is what's really right for this country," he said. "They want something to be done about this horrendous debt, something to be done about a lot of different things going on in the country. I mean our country is in a free fall and these are good American people. These are great American people."

Trump also pushed for a more comprehensive agreement than was being discussed at the time.

"Now, maybe as we're speaking, they're going to make a deal where they do some kind of an extension, but an extension is not what you need," he told Morgan. "You need the overall deal. We have to make a big deal and it has to be the proper deal for the country."

"Now, maybe as we're speaking, they're going to make a deal where they do some kind of an extension, but an extension is not what you need," he told Morgan. "You need the overall deal. We have to make a big deal and it has to be the proper deal for the country."

Endgame

By the time the shutdown ended, just after midnight on October 17, 2013, Trump had mostly moved on to other issues. He repeatedly mocked and assailed the "failed" Obamacare website, while also deflecting a persistent rumor about his political future.

Fast forward to today and it's President Trump in the White House and Republicans in charge of both chambers of Congress.

Republican leadership now is pushing for a short-term "continuing resolution" to keep the government open. Senate Democrats, meanwhile, are on the verge of rejecting it, demanding the fate of DACA recipients, whose protections will expire in March, be resolved now as part of a broader pact.

Outbrain