He is polarizing in Washington and polarizing at home. And in both places these days, he is getting more attention than anyone might expect, given his lack of seniority and thin legislative record.

As Representative Matt Gaetz of Florida orchestrated the ouster of Speaker Kevin McCarthy on Tuesday, constituents in his overwhelmingly Republican district had plenty of thoughts about their congressman’s actions and suddenly robust national profile.

“If we got rid of the speaker of the House, hopefully we get someone in there who doesn’t make backdoor deals with Democrats,” said Sandra Atkinson, the chairwoman of the Republican Party of Okaloosa County, adding that Republicans were proud of him for following through on his word.

Critics in his district saw a political moment that was about ego and ambition and little more.

“He is following through on using chaos as both a performative art — that phrase is overused but it’s true — and because he’s frustrated he’s not getting his own way,” said Phil Ehr, a Democrat who ran against Mr. Gaetz in 2018 and is now running for the U.S. Senate. “In some ways, he’s acting like a petulant child.”

Yet for all of his time spent picking fights — and, his critics say, little time crafting legislation — Mr. Gaetz remains broadly popular in his district, a stretch of the western Florida Panhandle, where he won re-election last year by nearly 36 percentage points. His skirmishes in Washington, and a federal investigation that revealed embarrassing details about his private life, have done little to bruise him.

“There’s a lot of people who like Matt Gaetz,” said Joel Terry May, 67, a local artist, as he showed off a painting in downtown Pensacola to visitors from New Orleans. “He speaks for the people, and he speaks out.”

Mr. May, who grew up in Alabama, remembers a time when former Gov. George C. Wallace visited his school back in the 1960s.

“People didn’t like George Wallace nationally, but the people who elected him and represented him did,” he said. “That’s what Gaetz also understands. When you represent somebody, you want them to maintain the feel of the people. People want to see Washington work. They want their representatives to have a pulse on the area.”

Mr. Gaetz is widely disliked by his peers in Congress but is grudgingly acknowledged to be smart and crafty, and certainly a master of drawing attention to himself. Mr. Gaetz was re-elected last year while under the cloud of an investigation in a federal sex-trafficking case that ultimately resulted in no criminal charges against him. (A congressional ethics review is pending.) Twice, women have been arrested after throwing their drinks at him.

Now, his support for a far-right posture that could shut down the federal government — directly affecting many of the people he represents — is unlikely to dent him, his critics acknowledged.

“He is loved by the First Congressional District,” said Mark Lombardo, who unsuccessfully challenged Mr. Gaetz in last year’s Republican primary.

Mr. Lombardo attributed his loss, among other things, to Mr. Gaetz’s family ties — his father, Don Gaetz, is a wealthy and well-known former president of the Florida Senate who on Monday filed to run for the Senate again after stepping down in 2016 — and his devotion to former President Donald J. Trump. Mr. Gaetz is one of Mr. Trump’s closest allies in Congress and has backed him for the 2024 Republican presidential nomination over Gov. Ron DeSantis of Florida.

“He was Trump, Trump, Trump, Trump, Trump, Trump,” Mr. Lombardo said of the congressman, “and the First District is all about Trump.”

No other congressional district in the country has as many military veterans, a group that could have been badly hurt by a shutdown. Yet even his critics concede that Mr. Gaetz remains popular among them.

Barry Goodson, 70, a registered Democrat and retired Army veteran who once helped organize people against a plan backed by Mr. Gaetz to privatize some of Northwest Florida’s sandy white beaches, said he worried that his health care providers at the Department of Veterans Affairs would suffer under a shutdown.

“I still can’t understand why Gaetz hates negotiating rather than working out something for the people in the district,” he said.

“A chaos agent is not good for public policy,” said Samantha Herring, a Democratic national committeewoman in Walton County. “It’s not good for getting highway funds, education and veterans’ affairs.”

And Mr. McCarthy’s ouster left even some fans of Mr. Gaetz with questions about exactly what had been accomplished.

John Roberts, chairman of the Escambia County Republican Party, said that Republicans, even those typically sympathetic to Mr. Gaetz’s views on other policies like immigration and the national debt, generally supported keeping Mr. McCarthy as speaker.

“It’s not like we’re mad at Matt Gaetz; he’s still a good congressman,” he said. “But I think this was probably the wrong move.”

But as the House smoldered and shook, other backers of Mr. Gaetz said they were all in.

Tim Hudson, 26, a lifelong Pensacola resident, has voted for Mr. Gaetz. Upon learning on Tuesday about the congressman’s successful ouster of Mr. McCarthy, Mr. Hudson offered only more praise.

“That just makes me support him even more,” Mr. Hudson said.

He added that the ouster of Mr. McCarthy “speaks to how the world really is right now. We’re tired. We’re fed up. We want to see people start getting things done.”

Susan C. Beachy contributed research.