After helping to ignite a firestorm over a possible nuclear agreement with Iran, Senator John McCain, a former Republican presidential candidate, is now sort of acknowledging his error. “Maybe that wasn’t exactly the best way to do that,” he said on Fox News on Tuesday.

He was referring to the disgraceful and irresponsible letter that he and 46 Senate colleagues sent to Iran’s leaders this week that generated outrage from Democrats and even some conservatives.

The letter was an attempt to scare the Iranians from making a deal that would limit their nuclear program for at least a decade by issuing a warning that the next president could simply reverse any agreement. It was a blatant, dangerous effort to undercut the president on a grave national security issue by communicating directly with a foreign government.

Maybe Mr. McCain, who is chairman of the Senate Armed Services Committee, should have thought about the consequences before he signed the letter, which was drafted by Tom Cotton, a Republican of Arkansas, a junior senator with no foreign policy credentials. Instead of trying to be leaders and statesmen, the Republicans in Congress seem to think their role is outside the American government, divorced from constitutional principles, tradition and the security interests of the American people.