All politicians bend the truth to fit their purposes, including Hillary Clinton. But Donald J. Trump has unleashed a blizzard of falsehoods, exaggerations and outright lies in the general election, peppering his speeches, interviews and Twitter posts with untruths so frequent that they can seem flighty or random — even compulsive.

However, a closer examination, over the course of a week, revealed an unmistakable pattern: Virtually all of Mr. Trump’s falsehoods directly bolstered a powerful and self-aggrandizing narrative depicting him as a heroic savior for a nation menaced from every direction. Mike Murphy, a Republican strategist, described the practice as creating “an unreality bubble that he surrounds himself with.”

The New York Times closely tracked Mr. Trump’s public statements from Sept. 15-21, and assembled a list of his 31 biggest whoppers, many of them uttered repeatedly. This total excludes dozens more: Untruths that appeared to be mere hyperbole or humor, or delivered purely for effect, or what could generously be called rounding errors. Mr. Trump’s campaign, which dismissed this compilation as “silly,” offered responses on every point, but in none of the following instances did the responses support his assertions.

Tall Tales About Himself

Mr. Trump’s version of reality allows for few, if any, flaws in himself. As he tells it, the polls are always looking up, his policy solutions are painless and simple and his judgment regarding politics and people has been consistent — and flawless. The most consistent falsehood he tells about himself may be that he opposed the war in Iraq from the start, when the evidence shows otherwise.

He said a supportive crowd chanted, “Let him speak!” when a black pastor in Flint, Mich., asked Mr. Trump not to give a political speech in the church. Fox News interview, Sept. 15. There were no such chants “I was against going into the war in Iraq.” Speech in Florida, Sept. 19. This is not getting any truer with repetition. He never publicly expressed opposition to the war before it began, and he made supportive remarks to Howard Stern. He said any supportive comments he made about the Iraq war came “long before” the war began. Fox News interview, Sept. 18. He expressed support for the war in September 2002, when Congress was debating whether to authorize military action. He said he had publicly opposed the Iraq war in an Esquire interview “pretty quickly after the war started.” Fox News interview, Sept. 18. The Esquire interview appeared in the August 2004 edition, 17 months after the war began. Before the Iraq invasion, he said, he had told the Fox News anchor Neil Cavuto something “pretty close” to: “Don’t go in, and don’t make the mistake of going in.” Fox News interview, Sept. 18. Not remotely close. He told Mr. Cavuto that President George W. Bush had to take decisive action He said that when Howard Stern asked him about Iraq in 2002, it was “the first time the word Iraq was ever mentioned to me.” Fox News interview, Sept. 18. Mr. Trump expressed alarm about Saddam Hussein and the situation in Iraq in 2000 in his own book

Unfounded Claims About Critics and the News Media

It’s not just Mrs. Clinton whom Mr. Trump belittles and tars with inaccurate information. He also distorted the facts about his Republican critics, including President George Bush and Gov. John Kasich of Ohio. And he claimed that Lester Holt, the NBC anchor moderating the first presidential debate, is a Democrat — but Mr. Holt is a registered Republican.

In the primaries, Mr. Kasich “won one and, by the way, didn’t win it by much — that was Ohio.” Fox News interview, Sept. 19. Mr. Kasich crushed him in Ohio , winning by 11 percentage points. Lester Holt, the NBC anchor and debate moderator, “is a Democrat.” Fox News interview, Sept. 19. Mr. Holt is a registered Republican, New York City records show. The presidential debate moderators “are all Democrats.” “It’s a very unfair system.” Fox News interview, Sept. 19. Only one, Chris Wallace of Fox News, is a registered Democrat. He said it “hasn’t been reported” that Mrs. Clinton called some Trump supporters “deplorable.” Speech in North Carolina, Sept. 20. It would be difficult to find a news organization that didn’t report her remark

Inaccurate Claims About Clinton

Mr. Trump regularly dissembles about his opponent, attributing ideas to Mrs. Clinton that she has not endorsed, or accusing her of complicity in events in which she had no involvement.

“Hillary Clinton and her campaign of 2008 started the birther controversy. I finished it.” Remarks in Washington, Sept. 16. Mrs. Clinton and her campaign never publicly questioned President Obama’s birthplace ; Mr. Trump made it his signature cause for five years. Mrs. Clinton had “the power and the duty” to stop the release of unauthorized immigrants whose home countries would not accept their deportation after they were released from prison. Numerous speeches, including in Colorado, Sept. 17, and Florida, Sept. 19. The secretary of state does not have the power to detain convicted criminals after they have served their sentences, and has little power to make foreign countries accept deportees. Mrs. Clinton has not criticized jihadists and foreign governments that oppress and kill women, gay people and non-Muslims. “Has Hillary Clinton ever called people who support these practices deplorable and irredeemable? No.” Speech in Florida, Sept. 19. She has denounced jihadists and foreign countries on the same grounds, if not necessarily using the same words. “Do people notice Hillary is copying my airplane rallies — she puts the plane behind her like I have been doing from the beginning.” Twitter , Sept. 20. He did not invent the tarmac rally or the campaign-plane backdrop. Mrs. Clinton destroyed 13 smartphones with a hammer while she was secretary of state. Speeches in Florida, Sept. 15 and Sept. 19. An aide told the F.B.I. of only two occasions in which phones were destroyed with a hammer. He said Mrs. Clinton is calling for “total amnesty in the first 100 days,” including “a virtual end to immigration enforcement” and for unauthorized immigrants to receive Social Security and Medicare. Speech in Colorado, Sept. 17. She has not proposed this. Mrs. Clinton is “effectively proposing to abolish the borders around the country.” Numerous speeches, including in Texas, Sept. 17. She is not even proposing to cut funding for the Border Patrol. “Hillary Clinton’s plan would bring in 620,000 refugees in her first term alone,” and would cost $400 billion. Numerous speeches, including in North Carolina, Sept. 20. She endorsed admitting 65,000 Syrian refugees this year, on top of other admissions. Mr. Trump is falsely claiming that she wants to do this every year and is estimating the cost accordingly.

Stump Speech Falsehoods

Some warped or inaccurate claims have become regular features of Mr. Trump’s stump speech. He routinely overstates the scale and nature of the country’s economic distress and the threats to its national security, and exaggerates the potential for overnight improvements if he were elected.

Esoteric Embellishments

Mr. Trump often dissembles on subjects of passing interest, like the news of the day or the parochial concerns of his local audiences. But his larger pattern of behavior still holds: These misstatements, too, accentuate the grievances of his supporters, and cast his own ideas in a more favorable light.