That changed in 1980, after then-Attorney General Benjamin Civiletti found that carrying on with business as usual violated the Antideficiency Act of 1870, which barred agencies from operating if they didn't have money to do so.

Reagan was the first to order nonessential federal personnel to go home in 1981, in a battle over spending cuts that he won.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

There were a series of other funding gaps and minor shutdowns in the years that followed — but none resulted in furloughs that lasted more than half a day.

READ: Past shutdowns and how they ended

That all changed in 1995, when then-Speaker Newt Gingrich and the newly elected GOP majority in the House challenged Clinton with a budget that raised Medicare premiums and cut environmental protections. The ensuing face-off led to the government shutting down twice in two months, with the second lasting 21 days. About 800,000 workers were furloughed — roughly the same amount affected in the current shutdown.

President Clinton meets with Republican congressional leaders at the White House on Dec. 29, 1995 to discuss the federal budget impasse. From left to right are Treasury Secreatry Robert Rubin, House Speaker Newt Gingrich, Clinton and Senate Majority Leader Bob Dole of Kansas. Wilfredo Lee / AP file

"This was a huge shock to the system," said Schneider.

The Republicans were blamed for the shutdown, and wound up largely backing down. "Clinton was eating our lunch," Sen. Bob Dole, R-Kan., the Senate majority leader at the time, later told The New York Times.

"It created a very bitter taste," Schneider said, adding that it was good for Clinton, who wound up cruising to re-election a year later. "Who paid the price? Republicans and Congress."

The lesson stuck — for 17 years. In 2013, Republicans who were opposed to Obama's Affordable Care Act tried to use a temporary funding bill to force changes to the law. The shutdown lasted 18 days, and wound up diverting attention from the troubled roll-out of the ACA. Obama and the Democrats emerged victorious, but the economy took an estimated $24 billion hit.

A USA Today/Princeton Survey Research poll found most Americans blamed Republicans for the mess. Sen. Ted Cruz, R-Texas., who had pushed for the shutdown, later distanced himself from it.

The current shutdown is technically the third of the Trump administration.

The president won his first shutdown battle last January, when Democrats backed off demands that immigrants in the Deferred Action for Childhood Arrivals program be protected. Senate Minority Leader Chuck Schumer, D-N.Y., complained that negotiating with Trump was like "negotiating with Jell-O."

The second lasted just nine hours, and was caused by a procedural tactic used by Republican Sen. Rand Paul of Kentucky, who was protesting the size of the spending bill.

Trump, who has reveled in shaking up Washington, may lose this latest fight, Schneider said, because he's made two major mistakes this time around.

He appeared to demand the $5 billion for a border wall at the 11th-hour only after pressure from right-wing media, and after he'd taken ownership for a possible shutdown in a meeting with Schumer and Rep. Nancy Pelosi, D-Calif, who is now the House speaker.

"If we don't get what we want one way or the other ... I will shut down the government," Trump said in their Dec. 11 meeting. "I am proud to shut down the government for border security."

"He's the one who claimed responsibility for it," Schneider said. "It's on tape."

And polls show "the wall is not a popular cause," Schneider said. "Trump is fighting for something that's very important to his base, and not very important to most Americans. The president's going to be seen as the one who created this issue."

"There's no question the political damage will be on him," he added, noting the general public loathes shutdowns. "The popular perception when there's a shutdown is the government's not doing its job. At a bare minimum, their job is to keep the government open."

Kaiser, author of "A Life in History," predicted Trump won't get what he wants, but will still claim victory.

"That's the pattern of President Trump that's started to emerge," Kaiser said. "He announces what he's got to have, and then eventually settles for much less."