At the end of a week in which the Democratic-led House passed a resolution setting out rules for the public phase of their impeachment inquiry into President Trump, he escaped Washington for a different sort of fracas: the Ultimate Fighting Championship.
Mr. Trump traveled to New York City on Saturday night to U.F.C. 244, sitting near the thick of the action at the mixed martial arts event at Madison Square Garden.
At his second sporting event in a week, and just days after news emerged that he had changed his residency to Florida instead of New York, Mr. Trump received a very loud, mixed reaction as he headed toward his seat next to the octagon as “Back in Black” by AC/DC blared throughout the arena.
Many fans, already standing as the president entered just before 10 p.m., booed loudly, while others cheered. Some held a large sign that said “Trump 2020 Keep America Great,” and others gestured obscenely toward the president.
Waiting for the pay-per-view fights to start, Mr. Trump stood from his seat and waved to the crowd, as many spectators took photos and videos. In a suit and red tie, he gave a thumbs up to the TV camera.
After a fight that ended in a spectacular head-kick knockout, a D.J. played “For the Love of Money” by the O’Jays, which was the theme song to Mr. Trump’s reality show, “The Apprentice.”
Derrick Lewis, an American heavyweight, won his fight in a split decision over Blagoy Ivanov, a Bulgarian fighter, as chants of “U.S.A.!” echoed. In a postfight interview, Mr. Lewis directed comments to the president. “I know everything ain’t going good in the White House,” he said, imploring Mr. Trump to “turn it around.”
Mr. Trump was accompanied by his sons Donald Trump Jr. and Eric Trump, as well as three of his Republican allies in the House, Representatives Kevin McCarthy, the minority leader, Peter King of New York and Mark Meadows of North Carolina.
Last weekend, Mr. Trump attended Game 5 of the World Series at Nationals Park in Washington, where he was vigorously booed. Chants of “lock him up!” rang around the stadium — a twist of the oft-evoked Trump rally chant of “lock her up!” aimed at his 2016 election opponent Hillary Clinton.
On Saturday, as Mr. Trump’s motorcade approached the Garden, one onlooker held a sign that read “headlock him up.”
The headlining event was a fight between Nate Diaz, the U.F.C.’s most unpredictable star, and Jorge Masvidal, a Trump supporter. The card of a dozen bouts was built mainly around glitz and drama, not an actual championship with the only belt at stake a profanely-named title to declare the “baddest” fighter between Mr. Diaz and Mr. Masvidal.
Still, it was expected to be one of the biggest U.F.C. pay-per-view events of the year, magnified by the presence of Mr. Trump as well as Dwayne Johnson, the star actor who once wrestled as the Rock and was expected to award the main event winner the specially-created belt.
“Hey, the president is showing up to my fight,” Mr. Masvidal told TMZ recently. “So that’s humbling in itself.”
Mr. Trump has been associated with the U.F.C. for almost 20 years. Mixed martial arts faced an uncertain future in the early 2000s after Senator John McCain, describing it as “human cockfighting,” led a charge to ban the sport, which is regulated state by state. Mr. Trump agreed to host a number of fights at the Trump Taj Mahal in Atlantic City, giving the U.F.C. a lifeline.
“I’m never going to say anything bad about Donald Trump, ever,” Dana White, the U.F.C. president, told Fox News last year. “Ever, ever, ever. That guy gave us our start when nobody would talk to us.”
According to the White House, Mr. White, who spoke at the 2016 Republican National Convention where Mr. Trump formally accepted his party’s nomination, invited the president to the fight.
The anticipation surrounding the president’s appearance, even as the city prepared for the New York City Marathon on Sunday morning, led to a chaotic scene in Midtown Manhattan. Streets were barricaded, law enforcement officers were out in droves and several dozen anti-Trump and pro-Trump demonstrators chanted outside Madison Square Garden as the event began.
But inside the arena, there were few signs anything was out of the ordinary. Enrique Bordier, 35, said he did not know Mr. Trump was attending the fight until a taxi driver told him on Saturday morning. Mr. Bordier traveled with his wife from El Paso for their first U.F.C. event.
Tony and Laura Majercik, from South Florida, have attended U.F.C. fights all over the country. Ms. Majercik said she was rooting for Mr. Masvidal, who is from Miami, while Mr. Majercik simply described himself as a “fighting fan.” Despite having voted for Mr. Trump, Mr. Majercik said he could do “without all the hoopla” the president’s visit generated.
Asked about the fast-moving impeachment inquiry into whether he had withheld aid to Ukraine to further his political interests, Mr. Trump told reporters that he had acted appropriately.
“It’s a scam. It’s a hoax, the Democrats are using it for political purposes, to try and win an election that they’re not going to win,” he said as he prepared to leave Washington.
Noah Weiland contributed reporting.