On Sunday morning, Mr. Trump invited Mr. Graham back to the White House to attend his announcement, which was delayed by about 30 minutes because he was still working on his remarks with Stephen Miller and his other speechwriters.

Mr. Trump, who has long resisted efforts from aides to address the nation from the Oval Office, agreed to the Diplomatic Reception Room as the setting for what he wanted to be a legacy-defining moment. And, there, he continued to underscore his competition with Mr. Obama by speaking at length about what he said were his own premonitions about Bin Laden, rather than focusing on the events of the day.

He repeated the misleading claim that he delivered a warning about Bin Laden in one of his books. “Nobody listened to me,” Mr. Trump lamented. “ To this day, I get people coming up to me, and they said ‘you know one of the most amazing things I’ve seen about you is that you predicted that Osama bin Laden had to be killed before he knocked down the World Trade Center.’”

In reality, Mr. Trump’s book, “The America We Deserve,” makes one passing reference to Bin Laden, where he is simply referred to as “public enemy No. 1.”

But on Sunday morning, Mr. Trump took credit not only for the raid that killed Mr. a-Baghdadi, but also for having been wiser than his predecessors. “I made a prediction,” he said. “Let’s put it this way. If they would have listened to me, a lot of things would have been different.”

From his implicit undermining of Mr. Obama to his focus on the fact that he has never received the credit he deserves, Mr. Trump handled the moment in a familiar way: putting himself at the center of the action, releasing information such as the number of helicopters involved in the operation that are normally classified, and focusing on vivid, cinematic details of a raid he bragged unfolded “as though you were watching a movie.”