He knew it was coming. It almost felt inevitable. No other president in American history has been seriously threatened with impeachment even before his inauguration. So when the announcement came on Tuesday that the House would consider charging him with high crimes and misdemeanors, President Trump made clear he was ready for a fight.

He lashed out at the opposition Democrats, denouncing them for “crazy” partisanship. He denounced the allegations against him as “more breaking news Witch Hunt garbage.” And he proclaimed that even if the impeachment battle to come will be bad for the country, it will be “a positive for me” by bolstering his chances to win a second term in next year’s election.

The beginning of the long-anticipated showdown arrived when Mr. Trump was in New York for the opening session of the United Nations General Assembly, creating a surreal split-screen spectacle as the president sought to play global statesman while fending off his enemies back in Washington. One moment, he talked of war and peace and trade with premiers and potentates. The next, he engaged in a rear-guard struggle to save his presidency.

Mr. Trump gave a desultory speech and shuffled between meetings with leaders from Britain, India and Iraq while privately consulting with aides about his next move against the House. Shortly before heading into a lunch with the United Nations secretary general, he decided to release a transcript of his July telephone call with the president of Ukraine that is central to the allegations against him. In effect, he was pushing his chips into the middle of the table, gambling that the document would prove ambiguous enough to undercut the Democratic case against him.