Mr. Trump’s candidacy for president ran into considerable antipathy in heavily Mormon Utah, where Republican candidates usually coast to victory. Evan McMullin, a Mormon and a former C.I.A. officer and policy director for House Republicans who ran as an independent in 2016, received 21 percent of the vote in the state. Hillary Clinton, the Democratic candidate, won 27 percent, so altogether, more Utahans voted against Mr. Trump (48 percent) than for him (45 percent).

Max Perry Mueller, an assistant professor of American religion at the University of Nebraska-Lincoln, said he heard so many religious overtones in Mr. Flake’s speech that he plans to set aside his next planned lesson for the American religious history class he teaches, and instead have his students deconstruct the senator’s remarks “as a Mormon speech.”

Professor Mueller said the speech reminded him of the cadence, tone and themes that Mormon leaders often use when addressing the church’s vast general conference meetings in Salt Lake City, calling on members to refuse to accommodate the immorality of the larger world.

“That speech reflects a Mormon understanding of human agency and participation in history, that humans bring about change, and move the world towards perfection,” said Professor Mueller, the author of “Race and the Making of the Mormon People.”

In one passage near the end of his speech, Mr. Flake said: “This spell will eventually break. That is my belief. We will return to ourselves once more, and I say, the sooner the better. Because we have a healthy government, we must also have healthy and functioning parties. We must respect each other again in an atmosphere of shared facts and shared values, comity and good faith. We must argue our positions fervently and never be afraid to compromise.”

In the telephone interview, Mr. Flake spoke of his deep involvement with his church, of serving as a missionary in South Africa and Zimbabwe in the 1980s, and of rarely missing a Sunday service with his family in Mesa, Ariz., over his 17 years in Congress.