WASHINGTON – You hear a perfect record cited over and over in the debt limit debate: The United States has never defaulted. Better put an asterisk by that.

America has briefly stiffed some of its creditors on at least two occasions.

Once, the young nation had a dramatic excuse: The Treasury was empty, the White House and Capitol were charred ruins, even the troops fighting the War of 1812 weren't getting paid.

A second time, in 1979, was a back-office glitch that ended up costing taxpayers billions of dollars. The Treasury Department blamed the mishap on a crush of paperwork partly caused by lawmakers who — this will sound familiar — bickered too long before raising the nation's debt limit.

As Congress again tests the limit, Washington could learn some things from its past. But those periods of missed payments, little noted outside financial circles in their day, are nearly forgotten now.

Indeed, Treasury Secretary Jacob Lew frequently declares that the United States has always met all of its obligations; a Treasury spokeswoman declined to discuss any possible exceptions. President Obama, reminding Congress of the urgency of raising the debt limit before a Thursday deadline, warned there could be chaos "if, for the first time in our history, we don't pay our bills on time."

"He doesn't know his history," says historian Don Hickey. "It's that simple."

That kind of omission doesn't surprise Hickey, author of the book "The War of 1812: A Forgotten Conflict." Even Americans who study that war won't find the failure to pay some bondholders on time in many history texts, said Hickey, a professor at Wayne State College in Nebraska. Naval heroics and the rockets' red glare tend to get the ink.

The narrow lapses of the past don't compare with the kind of turmoil that Lew predicts would occur these days if the Treasury couldn't borrow enough money to pay what it owes to all sorts of people, from overseas bondholders to retirees on Social Security.

Still, there are lessons in history.

Playing with fire is risky

Tea Party Republicans weren't the first to make the debt limit a bargaining chip. Over the years, congressional Democrats and Republicans alike have held it up for strategic reasons.

In 1979, it was lawmakers determined to attach a strong balanced-budget amendment to the bill. They finally relented, the day before Social Security checks were expected to start bouncing.

The tumult contributed to Treasury's failure to redeem $122 million in maturing T-bills, touted as one of the world's safest investments.

Some investors that April and May waited more than a week for their money. Treasury blamed problems with its newfangled word-processing equipment. The system was stressed, officials said, when the booming popularity of T-bills collided with the last-minute debt ceiling increase from Congress.

Investors called it a "default" and sued for interest to cover the gap. Treasury called it a "delay." Most Americans didn't notice at all. But the bond market did. T-bill interest ticked up 0.6 percent, a lasting bump that added about $12 billion to the cost of paying the national debt, according to a 1989 study in the Financial Review journal. Its title: "The Day the United States Defaulted on Treasury Bills."

That certainly counts as a default, even though it was unintentional, said Urban Institute economist Donald Marron, a former member of Obama's Council of Economic Advisers. When Congress keeps Treasury waiting for an increase in its borrowing limit, he said, "the cushion against mistakes gets smaller and smaller."

It was worse during early war

Sure, it's tough dealing with bullheaded political foes. But at least Washington's not on fire.

The fall of 1814 was bleak. The British had burned the capital city, inspired "The Star-Spangled Banner" by bombarding Baltimore and blocked trade up and down the coast. Tax revenue plummeted, and the U.S. couldn't borrow all the money it needed. The War Department ran short of food and medicine as it couldn't buy more — or pay the troops.

That November, the government didn't have enough gold or silver in New England to pay bondholders their interest, as required by law.

But "the war ended about three months later," Hickey said, "and so the financial crisis blew over."

Compromise isn't easy

Just like today, some politicians in the early 1800s believed their cause too crucial to negotiate.

"What you have at the time is a very bitter partisan divide between Federalists and Republicans that was, if anything, more bitter than the divide between the Tea Party and Democrats today," said historian J.C.A. Stagg, editor of President James Madison's papers at the University of Virginia.