In an extraordinary public rebuke of Donald Trump’s campaign, Mitt Romney and John McCain, the last two Republican presidential nominees, denounced Trump in forceful terms on Thursday and warned that his election could put the United States and even its democratic political system in peril.

Offering himself as a bulwark against Trump’s march to the nomination, Romney laid out a precise and lengthy case against Trump, lacerating his business dealings, his erratic pronouncements on national security and demeaning treatment of women, minorities and the disabled.

Romney warned that Trump’s nomination would be calamitous for the Republican Party and, quoting John Adams, even suggested it could be suicidal for the country.

Evoking the specter of totalitarianism, Trump, he said, was amplifying a “brand of anger that has led other nations into the abyss.”

“His domestic policies would lead to recession,” Romney said. “His foreign policies would make America and the world less safe. He has neither the temperament nor the judgment to be president.”

McCain, once a rival of Romney’s, effectively linked arms with him soon after his address, saying that he shared Romney’s dismay about Trump’s ascent. Alluding to a public letter released on Thursday by dozens of conservative national security leaders, who vowed never to support Trump, McCain echoed their concerns about Trump’s “uninformed and indeed dangerous statements on national security issues.”

The onslaught against Trump appeared aimed at sowing new doubts among voters about a man who has taken firm command of the Republican presidential race, and stiffening the resolve of mainstream Republicans to reject Trump.

But the timing of the assault, after Trump’s commanding electoral victories on Tuesday, may make it futile. And Romney’s history with Trump, which he ignored in his comments on Thursday, could undercut the power of his warning: Romney eagerly sought and publicized his endorsement by Trump in 2012, even as Trump heckled and harassed President Barack Obama with accusations that he was not born in the United States.

In an addendum to his speech conveyed on Twitter, Romney said that he would not have accepted the endorsement had Trump at the time made many of the divisive remarks he has delivered recently.

Trump answered Romney’s critique with a belittling rant at a midafternoon speech in Maine: He called Romney a “failed candidate” and mocked him for his politically damaging 2012 comments about the “47 percent” of Americans who do not pay taxes, and for fumbling his final debate with Obama. He described Romney as having debased himself to secure a Trump endorsement in that election.

“He was begging for my endorsement,” Trump said. “I could have said, ‘Mitt, drop to your knees.’”

Romney’s associates have called that characterization inaccurate.

It is unheard of in the modern Republican party for mainstream party leaders to savage a presidential candidate who appears well on his way to locking up the nomination. The Super Tuesday primaries more typically mark the beginning of the party’s rallying around a single candidate.

But Romney’s speech, especially, cast Trump as an unacceptable candidate under any circumstances:

“a phony” and “a fraud” who could not be trusted with the nation’s highest office. Such language would be impossible to retract in a general election campaign and all but precludes a later endorsement.

Romney, who has not endorsed a candidate in the presidential race, insisted it was not too late to block Trump, and effectively called for a contested convention to select a nominee. He urged Republican primary voters to cast ballots for whichever candidate appeared to be the strongest Trump alternative in each state: Sen. Marco Rubio in Florida, Gov. John Kasich in Ohio, and Sen. Ted Cruz wherever appropriate.

The appeal from Romney and other party leaders comes at a desperate moment for Trump’s opponents, who must defeat him in several of the big states that vote in March to block him from seizing an insurmountable lead.

If Romney’s remarks resonate anywhere, they may be most important in two states that vote on March 8: Michigan, where Romney was raised and his father was governor, and Idaho, where he is a popular figure with fellow Mormons.

Frances F. Townsend, a former homeland security adviser to George W. Bush, said she hoped Thursday would mark a turning point in the race, and encourage others to speak out against Trump.

“There needed to be a group that would stand up and say, yes, I am willing to be counted,” Townsend said. “We cannot all be silent, or be Chris Christie and decide, I am going to put myself first and, for political and opportunistic reasons, I am going to endorse this stuff.”

But neither Romney nor McCain addressed the party’s failure to mount a Stop Trump campaign until this late stage in the race, a decision many Republicans now view as a grave error.

John F. Lehman, a former Navy secretary who advised McCain’s 2008 campaign, said that it was appropriate to raise questions about Trump’s fitness to serve as commander in chief — but that it may be too late to make a difference.

“It’s too bad that the party has waited so long, and the other candidates waited so long, to point out these shortcomings, because they are severe,” Lehman said. Explaining the delay, Lehman acknowledged, “People haven’t come out against him because nobody thought he’d get this far.”

Gov. Chris Christie, in New Jersey, defended Trump and his own decision to support him. He said that he had no problem with Romney’s condemnation of Trump, but that the Republican Party should not meddle in the primary election process.

“Democracy is in action,” Christie said. “It is the people who vote who ultimately decide who the nominee is. That’s how Mitt Romney became the nominee.”

Historians could not recall another time in the last century when the Republican Party’s past standard-bearers had so harshly attacked a would-be successor. The most recent antecedent, they said, might be the 1912 election, when Theodore Roosevelt led an exodus of progressive voters from the Republican Party, and ran as a third-party candidate against William Howard Taft.

Romney’s across-the-board condemnation of Trump’s character and his fitness for the presidency raised the prospect of a similar rupture in the fall, if Trump is the Republican nominee.

“There probably hasn’t been this level of personal invective by one Republican nominee against another leading candidate ever,” said David Greenberg, a historian at Rutgers University. “Perhaps not even in 1912 when T.R. went after Taft.”