Over Mexican food one recent evening, Pete Buttigieg told war stories from his presidential run to a small group of senators — including one who would have been an implausible dinner companion 18 months ago. At the table was Amy Klobuchar, his archnemesis on the campaign, who shared her own memories from the trail. The conversation was good-natured, according to a participant.

It wasn’t the first time this year that Buttigieg had broken bread with Klobuchar. In March, Klobuchar (D-Minn.) joined Buttigieg for lunch and a dog walk, according to an aide with knowledge of the event — a far cry from the days of trading bitter insults on live television. “I wish everyone was as perfect as you, Pete,” Klobuchar said mockingly in one debate last year. “But let me tell you what it’s like to be in the arena.”

Six months into his tenure as President Biden’s transportation secretary, Buttigieg has not only entered the arena, he is standing at center court and schmoozing with players on both teams. A former South Bend, Ind., mayor who embraced the outsider mantle as a candidate, Buttigieg has quickly morphed into a quintessential Washington insider. He has used his position at the center of the high-stakes infrastructure talks to mend old rifts, strengthen existing friendships and build new alliances.

His smooth debut has taken on greater significance as Democrats confront tough questions about the future of the party leadership. Biden says he intends to run for reelection, but as he nears his 79th birthday, that is no sure bet for many Democrats. Vice President Harris, Biden’s heir apparent, has had a rocky first few months on the job, prompting some Democrats to question her ability to pick up the baton.

Buttigieg’s networking is unfolding against that backdrop. He has struck a bond with the famously irascible Rep. Don Young (R-Alaska) and joined Rep. Rodney Davis (R-Ill.) on a bike ride. He visited House Transportation and Infrastructure Committee Chairman Peter A. DeFazio (D-Ore.) on his houseboat, bringing a bottle of liqueur for his host. He was spotted grabbing tacos with Rep. Alexandria Ocasio-Cortez (D-N.Y.).

As the infrastructure talks heated up, he asked a friend, Sen. Christopher A. Coons (D-Del.), for a scouting report on the senators hammering out the deal. “What can you tell me about how it came together? And how do they know each other? Who is closer to the White House and who is not?” Coons remembered Buttigieg asking him.

“He’s adapted well so far,” added Coons, who said he has known Buttigieg for a decade.

This article is based on interviews with two dozen Buttigieg aides, associates and others with knowledge of his activities. Many spoke on the record, but some would only speak on the condition of anonymity to candidly describe private discussions.

Buttigieg declined to be interviewed. In a statement, his spokesman Ben Halle said Buttigieg is “honored to serve on the President’s Jobs Cabinet.”

As a chief salesman for the bipartisan infrastructure plan that passed the Senate last Tuesday, Buttigieg has emerged the most visible member of the Cabinet, and he is expected to play a prominent role as the talks shift to the House. Buttigieg and Harris are the only two primary rivals Biden brought into his administration.

He is omnipresent on television and across the country, pitching new investments in railways and electric vehicles. He has become a fixture at dinners, Zoom meetings and photo-ops with boldface names. He gives out his number freely to members of Congress and frequently trades text messages with them.

Just 39, Buttigieg was a surprise sensation in the 2020 presidential race — an openly gay candidate who rose from obscurity to the final stage of the Democratic primary, preaching moderation and optimism. He has stayed in touch with members of his powerful donor network, parts of which have stuck together and put their money behind new causes. Many are hopeful Buttigieg will run again, and his name routinely comes up in conversations about future elections.

Buttigieg is the country’s first openly gay Cabinet secretary confirmed by the Senate.

Advisers and allies say Buttigieg is engrossed in his current work and not thinking about the future. “I think he’s very focused on doing the job he was asked to do, and he’s probably smart enough to know that worst thing you can do in the Biden administration is to appear to be trying to figure out his next thing,” said Steve Elmendorf, a lobbyist who helped raise money for Buttigieg early in his 2020 campaign.

In the eyes of some Buttigieg allies, the transportation job positions him well by giving him a big role in the infrastructure package, a centerpiece of Biden’s presidency. They also think it can help him shore up his biggest weakness as a candidate — his struggles among voters of color — by enabling him to showcase public works projects in diverse communities.

“Tailpipe emissions disproportionately impact communities of color and lower-income communities that tend to live nearer to heavily trafficked roadways and routes,” Buttigieg said in a typical comment during a recent trip to Georgia. “We have a chance to drive health equity as well as economic development through the right kind of climate action.”

Buttigieg’s future political pathways are limited because he would struggle to win statewide office in Indiana, given its deeply conservative slant. That makes his stint as transportation secretary a critical opportunity to raise his political profile after his breakout presidential campaign.

He has climbed the political ladder quickly, thanks largely to his skills as a communicator. Buttigieg sticks to the script and rarely makes verbal miscues. He’s a nimble public speaker, able to crack a joke about made-in-America jet packs on late night TV — and namecheck a local tunnel project in New Jersey.

Equally important is his talent for forging relationships, as he did with wealthy donors during the presidential campaign. Many of the lawmakers he is courting on infrastructure are likely to be power brokers in future Democratic presidential primaries.

Some allies see his outreach as a reflection of an almost nerdy affinity for transportation issues, pointing to his experience as mayor, even as he’s acknowledged to lawmakers that he’s faced a steep learning curve as head of the department.

“Coming from that midsize city where partisan politics are less of an issue,” said Rep. Anthony G. Brown (D-Md.), who was a national co-chair of Buttigieg’s presidential campaign, gives him a “refreshing approach and perspective.”

But critics see a more cynical dynamic at play.

“Buttigieg seems more interested in building his network to support his plans for higher office than doing the job he has now,” said Dan Eberhart, an oil industry executive and a Republican donor. “He’s not letting any moss grow beneath his feet.”

There is little dispute, however, that Buttigieg has been a quick study in the ways of Washington, where successfully navigating the complex ecosystem of egos, feuds and backbiting can be tricky even for seasoned operatives. Buttigieg’s central strategy, as in his campaign, is to always be accessible.

During the infrastructure negotiations, Buttigieg served as a sounding board for key senators such as Sen. Thomas R. Carper (D-Del.), who initially raised concerns that the plan did not sufficiently address water systems, according to a senior White House official.

“He is very good at anticipating questions and being able to respond to them without a lot of rhetoric or gibberish,” said Carper.

Rep. Debbie Dingell (D-Mich.) recalled discussing with Buttigieg her worries about the term “green jobs,” which she said could alarm blue-collar workers concerned about the future of their industries. Buttigieg agreed: “We need to get the vocabulary right,” Dingell said Buttigieg told her.

DeFazio, who called Buttigieg “the highest-profile secretary of the Department of Transportation we’ve ever had,” recalled a Buttigieg visit to the congressman’s houseboat in the spring. “He likes beer,” said DeFazio, adding that Buttigieg brought over “some very interesting liqueur.”

Such casual gatherings have been a staple of Buttigieg’s schedule. Sen. Angus King (I-Maine), who attended the dinner with Buttigieg and Klobuchar at the Agua 301 restaurant in Washington, said he got them to open up about “running for president, and what it was like to be on the debate stage with one another.”

King said there was “no tension or sparring” between the two at the dinner, which Sens. Richard J. Durbin (D-Ill.) and Jon Ossoff (D-Ga.) also attended. “Maybe because they both lost,” he added with a chuckle.

That is a big change from the campaign, especially a bitter Democratic debate in Las Vegas in February 2020 when Buttigieg and Klobuchar were both seeking the centrist vote. He ridiculed her for being unable to name of the president of Mexico, saying she was “not able to speak to literally the first thing about the politics of the country to our south.” Klobuchar, disdain evident on her face, shot back, “Are you trying to say that I’m dumb?”

Buttigieg has also assiduously reached out to Republicans. His relationship with Davis began during an Oval Office meeting on infrastructure in March, the congressman recalled. Davis jokingly told Buttigieg that the only way he would talk about bike trails was if the secretary joined him on one.

The secretary took him seriously, and in June, they rode from the Cannon House Office Building down the National Mall and into Virginia. Buttigieg borrowed husband Chasten Buttigieg’s bike because his was in the shop, and Davis snagged one from the Capitol Police.

“We got a chance to ride and really talk about personal things, rather than policy,” Davis said. The topics included mutual friends and politics, and Davis, who had campaigned for President Donald Trump in Iowa, credited Buttigieg for having “by far the best” ground game in the state.

Young, meanwhile, has spoken with Buttigieg about a potential trip to Alaska. It’s an unlikely friendship in some ways; Young is the longest-serving member of the House, coming to Congress in 1973, nearly a decade before Buttigieg was born. The congressman wants to show Buttigieg his state’s infrastructure needs up close, according to a Young aide.

Sen. Shelley Moore Capito (R-W.Va.), the lead GOP negotiator on the first round of infrastructure talks, which ultimately failed, said Buttigieg persistently stayed in touch with her.

“He kept following up on the phone,” Capito said. “‘Is there anything I can do?’ ‘Is there anything that you want?’ ‘How can I help you, help get this over the finish line?’”

Yet the transportation secretary job was never preordained. Buttigieg had set his sights on becoming ambassador to the United Nations, and was disappointed not to get that job.

But he was always seen as a near-lock for a prominent position somewhere in the administration. He first entered the Biden orbit when he endorsed him right after ending his own campaign, a big decision in what was then still a fluid race. “He reminds me of my son, Beau,” Biden said after Buttigieg endorsed him.

Once everything was finalized, Buttigieg, a Harvard graduate and former Rhodes Scholar, dove right in. When he was presented with a dense Google document to help him prepare, the eyes of some on his team glazed over. But by the next day, Buttigieg had marked it up with notes, according to a person with knowledge of the document.

Buttigieg has become one of the White House’s favorite Cabinet secretaries, since he does what he’s asked. He is frequently asked by the Biden aides to appear on television or attend events, for example, and rarely says no. He has also developed a genuine friendship with Harris, aides said. Once adversaries on the campaign trail, the two became friendly when Buttigieg played the role of Vice President Mike Pence as part of Harris’s debate preparations.

Chasten Buttigieg and second gentleman Doug Emhoff developed a close friendship on the campaign trail. Emhoff was at Buttigieg’s swearing-in — one of the few he attended, out of the many his wife conducted — and a photo from that ceremony hangs in Emhoff’s office in the Eisenhower Executive Office Building.

When Buttigieg ran for president, he assembled an impressive roster of wealthy donors, and many of them remain in regular contact with each other, hoping for another national Buttigieg campaign.

“Many of us are still in touch,” said Alex Slater, a Buttigieg fundraising bundler who founded a public affairs firm. “I hope we’ll be able to maintain it as he changes gears.”

A WhatsApp group formed nearly two years ago by Buttigieg donors who were worried about getting lost at the Iowa Steak Fry, a key campaign stop, is still active today. It has become a tool for donors to share articles and updates about Buttigieg, as well as other political and fundraising activities. Buttigieg keeps in touch with members of the group.

The group also helps candidates who supported Buttigieg. Later this month, Buttigieg donors are holding a Zoom fundraiser for Quentin Hart, the mayor of Waterloo, Iowa. Hart, the Black mayor of Iowa’s most diverse city, was a key surrogate for Buttigieg as he struggled to make inroads with voters of color during his campaign.

“Mayor Hart is a great example of candidates that we know share our values, and they’re sort of part of the community,” said Nicole Davison Fox, a Buttigieg bundler and a partner at a New York investment fund. “It’s a community that’s rooting for Pete and the Biden administration from the sidelines.”

Paul Kane contributed to this report.