President Obama announced a “historic” agreement with Iran on Tuesday to end decades of conflict over its nuclear ambitions.

Unfortunately, the price tag for this slice of history is craven capitulation on what were once American red lines.

The deal “makes our country and the world safer and more secure,” Obama declared.

Under a compromise worked out by Sens. Bob Corker (R-Tenn.) and Ben Cardin (D-Md.), Congress now has 60 days to review the deal. The irony is that congressional critics might base their opposition on the red lines once drawn by Secretary of State John Kerry and President Obama themselves.

In 2013, Kerry declared of the Iranians, “There is no right to enrich.” Two years later? The final agreement allows Iran to keep 5,000 centrifuges, 2,000 more than Pakistan had when it secretly built a nuclear arsenal.

Nor will Iran be limited to current technology; Kerry has ceded Iran’s right to experiment with new-generation centrifuges exponentially more powerful than Iran has now.

But centrifuges are only one part of Iran’s illicit program. In 2013, Kerry told Congress the “whole point of the [sanctions] regime” was to force Iran to “dismantle its nuclear program.” But the deal to which Kerry agreed lets Iran keep everything in place.

This includes Fordo, the once-covert nuclear site Iran built under a mountain.

“They don’t need to have an underground, fortified facility like Fordo in order to have a peaceful nuclear program,” Obama said in 2013. Congress will likely ask what changed, since this deal allows Iran to keep Fordo.

It gets worse. In 1991, the International Atomic Energy Agency required South Africa to come clean on the past 20 years of its nuclear work in order to certify that it had ceased its nuclear weapons program.

Anything short of that, and the IAEA said it could not certify that all material was accounted for. And yet, Kerry caved on this, effectively crafting a deal the IAEA can’t certify.

But what about “anytime, anywhere” inspections? Again, the administration backtracked. First, they qualified by saying they’d be the most intrusive inspections on any country “not defeated in war.”

Then, Kerry backed down on demands that inspectors be able to conduct snap inspections on military sites. Those inspections are necessary because this is where, according to the IAEA, Iran worked on everything from components for a warhead to detonators.

Finally, he allowed Iran essentially to pre-approve any inspection. That’s the equivalent of having a criminal pre-approve a search warrant.

Then, of course, there’s the arms embargo. It gets lifted after a short period of time.

This not only means Iran can use its $100 billion signing bonus (equivalent to 15 times the annual budget of the Iranian Revolutionary Guard Corps) to buy weapons.

It also means Iran can export them to terrorist groups across the region.

Essentially, Obama is reimbursing Iran in full for decades of investment in a covert nuclear program.

The White House insists that Iran will use that money for good, but history disagrees. When Europe tried a similar strategy between 2000 and 2005, Iran invested the bulk of its hard-currency windfall in its covert nuclear program and ballistic missiles.

The White House believes that even if Congress rejects the deal, Obama retains enough support among Democrats to veto any rejection and have the deal hold.

Loyalty to a lame-duck president should never be an excuse to bless a deal so destructive to American and regional security.

Critics characterize the Iran deal as the worst diplomatic bargain since British Prime Minister Neville Chamberlain appeased German Chancellor Adolf Hitler on the eve of World War II.

The Wall Street Journal’s Bret Stephens explained, “In 1938, Chamberlain bought time to rearm. In 2013, Obama gives Iran time to go nuclear.”

Kerry’s deal goes farther, and approaches that of his predecessor Frank B. Kellogg, who, in 1928, crafted a pact to ensure “the renunciation of war as an instrument of national policy.”

Indeed, even before finalizing the agreement, Kerry told The Boston Globe over the weekend that a nuclear deal could open new doors to a broader Middle East peace:

“I think that there’s an opportunity here to galvanize people.” Members of his negotiating team already reportedly talk about who might play them in a future movie.

For his efforts, Kellogg won the Nobel Peace Prize — but he also laid the groundwork for a world war. Blinded by a noxious mix of ambition and naïveté, Kerry and, for that matter, Obama may not be so different.

Michael Rubin is a resident scholar at the American Enterprise Institute.