It was just hours after Boris Johnson, then Britain’s foreign secretary, returned to London from a whirlwind trip last year to try to persuade the White House to abide by the Iran nuclear accord.

Kim Darroch, then the British ambassador to the United States, fired off a withering assessment of President Trump’s wish to quit the deal. Mr. Trump, he wrote in leaked diplomatic cables that were published on Saturday, was “set upon an act of diplomatic vandalism, seemingly for ideological and personality reasons — it was Obama’s deal.”

The vice president, the national security adviser and the secretary of state had all failed to “articulate why the president was determined to withdraw, beyond his campaign promises,” Mr. Darroch wrote. And the American government had no plan for what would follow.

“Even when you pressed,” Mr. Darroch wrote to Mr. Johnson, “none had anything much to say about the day after, or a Plan B, beyond reimposition of U.S. sanctions.”

With Iran and the United States now locked in an escalating standoff, the leaked cables offered a window into Britain’s frantic effort to save the Iran nuclear deal in May 2018 — and the Trump administration’s indifference to its entreaties.

Published by a British tabloid, The Mail on Sunday, the cables are the second batch of leaked documents that led to Mr. Darroch’s resignation last week. The British Foreign Office has previously made it clear that the leaked documents were authentic.

Mr. Darroch resigned after Mr. Trump vowed to stop dealing with the ambassador, and after Mr. Johnson, now the front-runner to succeed Prime Minister Theresa May, repeatedly refused to say he would keep Mr. Darroch in his post.

Mr. Johnson’s position drew fierce criticism from his opponent in the prime minister race, Jeremy Hunt, the current foreign secretary, as well as from some of the Conservative Party members who are voting on the next party leader and prime minister.

On Friday night, Mr. Johnson acknowledged in a BBC interview that his failure to stand behind Mr. Darroch had been part of the reason the ambassador decided to resign. Heckled that same night at a campaign event, Mr. Johnson said for the first time that he wished he had publicly supported Mr. Darroch.

“I probably should have been more emphatic that Kim personally had my full support,” Mr. Johnson said.

The leak has prompted an aggressive investigation by a counterterrorism unit of the Metropolitan Police, as well as a bitter dispute over the right of The Mail on Sunday to publish the files.

Assistant Commissioner Neil Basu, the leader of the counterterrorism unit, warned before the latest release that publishing any further documents “may also be a criminal matter.” He asked newspapers to turn over any leaked documents to the police.

Journalists, lawmakers and both candidates for prime minister leapt to the defense of The Mail on Sunday, saying the warning from the police jeopardized the workings of a free press.

“I defend to the hilt the right of the press to publish those leaks if they receive them & judge them to be in the public interest: that is their job,” Mr. Hunt said on Twitter.

Mr. Johnson said he worried that clamping down on the publication of leaked documents would have “a chilling effect on public debate.”

British news reports on Saturday indicated that the police were focusing on a government insider in the leak investigation. Pro-Brexit politicians have blamed civil servants and diplomats for Britain’s failure to leave the European Union as scheduled, and Mr. Darroch, formerly Britain’s top diplomat in Brussels, was one of the senior officials most distrusted by Brexit supporters.

Brexiteers like Mr. Johnson have held out the prospect of a free trade deal with the United States as one of the rewards of a hard split with the European Union. But the cables published on Saturday reinforced how little weight the Trump administration gives the views of its allies, with Mr. Darroch writing that the United States was quitting the nuclear deal with “no sort of plan for reaching out to partners and allies, whether in Europe or the region.”

Mr. Johnson did not meet with Mr. Trump on the visit, but Mr. Darroch ensured that the foreign secretary had “exceptional access” to senior officials, including Secretary of State Mike Pompeo, the cables said. That meeting created the impression that parts of the administration were at odds over Mr. Trump’s determination to quit the Iran deal.

Mr. Darroch wrote that Mr. Pompeo “did some subtle distancing by talking throughout about ‘the president’s decision,’” and that Mr. Pompeo hinted at an attempt to “sell” Mr. Trump on a revised version of the nuclear deal or, short of that, milder sanctions than the president was seeking.

Vice President Mike Pence and John Bolton, Mr. Trump’s national security adviser, showed no such hesitation, though Mr. Bolton promised Mr. Johnson that the president “wasn’t favoring a military option,” the cables said.