“I support and endorse our speaker of the House, Paul Ryan,” Mr. Trump said at a rally here after announcing his backing of the senators. “He’s a good man. We may disagree on a couple of things, but mostly we agree.”
Mr. Trump ignited a controversy within his party on Tuesday when he said he was not “quite there yet” in supporting Mr. Ryan, echoing a similar line of doubt that Mr. Ryan, the nation’s most powerful elected Republican, had cast before eventually endorsing Mr. Trump for president.
The endorsement on Friday, in Mr. Ryan’s home state, Wisconsin, had the rollout of a carefully crafted campaign event. A fund-raising email was sent to supporters immediately after Mr. Trump’s announcement. Moments later, subscribers to Trump campaign texts received an alert that said, “Party unity will help Make America Great Again.”
He read the endorsement from a script. But before he got to those words, he spent several minutes in the off-the-cuff mode he is known for. He predicted that the Green Bay Packers would have a strong season, excoriated Hillary Clinton and argued that the news media had misconstrued his suggestion at a previous event that a crying baby be escorted out.
“The baby that had a voice that was superior to Pavarotti,” he said, adding, “I want to sponsor that baby.”
Mr. Trump turned the speech into a hatchet-burying trifecta. He threw his support to Ms. Ayotte, who is facing a tight race in New Hampshire to retain her Senate seat. Mr. Ryan and Mr. McCain, an Arizona senator, are also up for re-election, beginning with primaries next week.
“I need a Republican Senate and a House to accomplish all of the change we have to make,” Mr. Trump said. He added, “I understand and embrace the wisdom of Ronald Reagan’s big tent within the party.”
“Big, big tent,” he said. “Remember?”
He paused to ask the Democrats in the crowd to raise their hands. Hardly anyone made a sound. Mr. Trump, looking unimpressed, offered that he did not need Democrats anyway.
With the speech, Mr. Trump sought to move past a tumultuous week that began with his disparaging members of a Gold Star military familywho had spoken out against him at the Democratic National Convention. Mr. Trump’s remarks drew rebukes from many Republicans, including Mr. Ryan, Mr. McCain and Ms. Ayotte, and set the course for the next few days. He caused a tempest with his remarks regarding Mr. Ryan and another with repeated proclamations about viewing a “secret tape” that showed Iran receiving pallets of cash from the United States.
Perhaps signaling that he was in a forgiving and unifying mood, Mr. Trump on Friday morning issued a rare admission of an error,explaining on Twitter that the footage he had thought was a secret tape was instead a widely shown clip of American prisoners arriving in Geneva after being released by Iran.
His squabbling with Mr. Ryan and the senators threatened to further splinter Mr. Trump’s relationship with the party and infuriated many officials, including Reince Priebus, the chairman of the Republican National Committee. Mr. Trump’s running mate, Gov. Mike Pence of Indiana, publicly, but peacefully, disagreed with him and backed Mr. Ryan.
Mr. Priebus had made clear he hoped that Mr. Trump would get behind Mr. Ryan and the senators but told the nominee that he had to make the decision on his own.
The endorsement of Mr. Ryan is unlikely to assuage some Republicans who are concerned by the combative Trump campaign and have grown frustrated that the near-daily controversies have made it more difficult to focus on Mrs. Clinton, the Democratic nominee. On Friday, Gov. John Kasich of Ohio told CNN that he was considering voting Democratic for the first time.
“Let’s not get ahead of ourselves,” Mr. Kasich said in response to a question on the possibility that he would not vote for a Republican for president. He added: “I wish that I could be fully enthusiastic. I can’t be. So I don’t know what’s going to happen at the end.”
In Wisconsin, a battleground state where Mr. Trump lost a primary decisively to Senator Ted Cruz of Texas and endured unrelenting criticism from local conservative radio hosts, the speaker of the State House of Representatives greeted Mr. Trump with an open letter to fellow Republicans, saying, “We are Ryan Republicans here in Wisconsin, not Trump Republicans.”
“As Donald Trump has said stupid things and been rude to so many people over the past year, I usually chalked it up to inexperience and the spotlight of an incredibly hostile press,” the speaker, Robin Vos, wrote. “But since the convention, his lack of judgment has got to concern even the most ardent Trump supporters.”
And less than an hour before Mr. Trump took the stage, Mr. Ryan gave an interview to WISN, a Milwaukee radio station, offering more criticism of the presidential nominee.
“I hope he doesn’t keep doing things like this and distort conservative principles that we have to defend,” Mr. Ryan told the station.
He said he had not “changed anything” with regard to his support of Mr. Trump, but added: “I wish he would be a little more disciplined. What I say to him privately and what I’ve said publicly is Hillary Clinton is the one to focus on, not another Republican, not a private citizen criticizing you.”
Mr. Trump made his endorsement after striking notes of unity on Friday afternoon at a rally in Des Moines. He praised Mr. Priebus, saying he was doing a “fantastic job,” and complimented Mr. Pence, who was on the campaign trail with him for the first time since they had taken divergent positions on Mr. Ryan’s primary campaign.
“If you don’t like me, that’s O.K.,” Mr. Trump told the Iowa crowd. “Vote for Pence because it’s the same thing.”
Mr. Trump also focused his message in Des Moines on Mrs. Clinton, peppering his remarks with extended riffs and insult lines against her and President Obama. “She is pretty close to unhinged,” Mr. Trump said, criticizing Mrs. Clinton’s immigration and foreign policy positions, in particular with regard to Iran.
He also floated a conspiracy theory that the National Security Agency had the 33,000 deleted emails from Mrs. Clinton’s account (there is no record, report or indication that this is true). “Does N.S.A. have them? I don’t know,” Mr. Trump said. “Some people have been saying that, that the N.S.A. has them.”