In the early morning hours of Saturday, January 28, the day after Trump signed his executive order temporarily banning travelers from seven Muslim-majority countries, congressman Charlie Dent, a moderate Republican from Pennsylvania, put in a call to Kevin McCarthy, the six-term Republican from Bakersfield, California, and majority leader of the House of Representatives. Among the many travelers caught in the chaos at airports across the United States was a Syrian family that had been granted visas to join their relatives in Pennsylvania. But when they arrived in Philadelphia, the family was immediately sent back. The relatives contacted Dent for help, and Dent, in turn, went to McCarthy.

On paper, McCarthy is the second-most powerful member in the House after Speaker Paul Ryan, but in reality, no politician has more clout with the Trump White House than he does. McCarthy was one of the first Republican leaders to express support for Trump, and when Ryan and other Republicans disowned him after the release of the infamous Access Hollywood tape, McCarthy held his tongue and served as a go-between. In business and in politics, Trump prizes loyalty above all else, and McCarthy’s decision to stick by him is paying off. By all indications, he is Trump’s closest ally in Congress, charged with shepherding the president’s legislative agenda. McCarthy — whom Trump once called “my Kevin” — can already claim one major victory: the House’s repeal of Obamacare.

Dent explained his predicament to McCarthy — a delicate issue coming so soon after Trump’s order. “The timing of it was bad, and I needed to speak to somebody,” Dent says. McCarthy vowed to help, providing contacts at the White House and telling Dent to call right away. After some bureaucratic back-channeling, the Syrian family was allowed into the country ten days later. “Kevin was there to help me when I had some questions in the middle of the storm,” Dent told me.

McCarthy, who is 52, is something of a throwback. The revelation that he was recorded last year saying he thought Trump was being paid by Russian President Vladimir Putin — which he later claimed was a joke — threw a spotlight on a congressman whose work is mostly behind the scenes. He is not a policy wonk in the mold of Ryan. Nor is he a hard-core ideologue who sees politics as a match between good and evil, a view taken by some of the most conservative members of his party. He’s a modern version of a backslapping pol who has a keen tactical mind and loves nothing more than counting votes and cutting deals. “You cannot have too many friends,” McCarthy is fond of saying. He counts California’s liberal lieutenant governor, Gavin Newsom, as one and last year worked closely with Democratic senator Dianne Feinstein on a bill that delivered more water to the Central Valley. “Kevin’s about the best I’ve known just with his getting-along skills,” says Fred Barnes, executive editor of the influential conservative magazine The Weekly Standard.

The Charlie Dent episode illustrated McCarthy’s singular place in Trump-era Washington. He has the ear of the White House and the confidence of his own caucus (or most of it, at least). In turn, he is better positioned to get what he wants from the Trump administration than any other politician. Frank Luntz, the Republican pollster and an old friend of McCarthy’s, told me recently that he believes McCarthy will be the most powerful majority leader in decades. “To my knowledge, Trump doesn’t listen to that many people. He’s got a very tightly controlled echo chamber,” Luntz says. “That Kevin carries influence with him really matters.”

The first time I saw McCarthy work a room was at the Seven Oaks Country Club in Bakersfield. He was having breakfast with a hospital executive, and I was interviewing one of his biggest donors, the owner of a large carrot farm in the area. Almost everyone who knows him mentions McCarthy’s capacity to put people at ease, and it was on display. He seemed to know almost all the guests, shaking their hands, grasping elbows, greeting them with “How’s the grandkids?” and offering to introduce a local banker to the new secretary of the treasury. As we left the building, McCarthy made a point to tell me that he grew up on the other side of town in a blue-collar neighborhood — that he didn’t belong to Seven Oaks or to any country club, for that matter.

McCarthy’s roots extend deeply in Bakersfield, an oil and agricultural city of 360,000 that anchors the lower half of California’s Central Valley. His great-grandfather arrived in 1883 and operated a cattle ranch. His father was an assistant fire chief. The family, McCarthy says, was not especially political; like many in his generation, his father voted Democratic but gravitated toward the GOP when Ronald Reagan ran for president. By his own description, McCarthy was an indifferent high school student; while attending community college, he opened a deli with $5,000 he won in the state lottery. The experience shaped his core political view — that government shackles small businesses, stifles the economy, and needs to be scaled back. McCarthy likes to tell the story of how the city slapped him with a citation for hanging the wrong kind of sign outside his shop: “I’m just thinking, the sign brings in more people to buy more sandwiches, to pay more sales tax, to pay this guy to come and harass me.”

He sold the deli after two years and enrolled at California State University, Bakersfield, where he received his B.A., and then a master’s in business administration. Within a year of graduating, he was chairing the California Young Republicans and interning for local congressman Bill Thomas, chair of the powerful House Ways and Means Committee. Thomas was McCarthy’s opposite — he loved policy arcana and was known for his mean streak — but the two got along well. McCarthy eventually became the congressman’s district director, and after serving on the Kern Community College District board, he easily won election to the state assembly in 2002.

Soon after McCarthy took office, California experienced a political earthquake. For the first time in state history, voters recalled a sitting governor — Democrat Gray Davis — replacing him with a political neophyte, Republican Arnold Schwarzenegger. From the outset, McCarthy was an enthusiastic supporter.

Schwarzenegger, like Trump, rode to victory as an outsider, amassing angry voters who distrusted government and wanted to upend the system. He was propelled by his celebrity and made a point to scapegoat Latino immigrants. (Schwarzenegger ultimately overturned Davis’s decision to allow undocumented immigrants to obtain driver’s licenses.) He was also accused of groping women, trash-talked other politicians, and held views not typical of Republicans (he would sign landmark legislation to curb carbon emissions). Schwarzenegger and Trump would even share a campaign theme song: Twisted Sister’s “We’re Not Gonna Take It.”

Schwarzenegger’s crude style and unorthodox embrace of the GOP created an opening for McCarthy. He positioned himself as the calm to his fire. The gentleman to his boor. The one who could translate the bizarre for the establishment. “Kevin is very adept at looking at what people’s weaknesses are, and then he doesn’t attack you or criticize you  — he finds a way to endear himself to you to fill the gap in that space,” says Fabian Núñez.

Núñez, a Democrat, became the Speaker of the Assembly shortly after Republicans in the Assembly elected McCarthy to be their leader in 2004. They played basketball together many mornings and spent hours negotiating in Schwarzenegger’s Sacramento office. Democrats controlled both houses of the legislature but still needed Republican votes to pass the budget, giving McCarthy leverage. Núñez calls McCarthy “the best vote counter I know.” He delivered the necessary GOP support, but not before receiving concessions for his members. Later, McCarthy helped push through a revamp of the state’s workers’ compensation system, long a GOP goal, which he considers his biggest accomplishment while in Sacramento.

McCarthy was a master at making his fellow Republicans feel included. He remembered wedding anniversaries and sent flowers to spouses. One year, he gave everyone in the caucus a personally engraved iPod. He turned the home he shared with other legislators into a clubhouse, with a pool table, a poker table, and a barbecue. In the evenings, he’d run his members through flash cards to make sure they mastered the procedural rules of the Assembly floor. Then, while everyone else relaxed over a game of cards or pool, he would ask what happened in committee that day, keeping tabs on everything that was going on.

In March 2006, Bill Thomas announced he was retiring from Congress and made it clear that he wanted his protégé to succeed him. That November, McCarthy was elected to the House of Representatives in a landslide. One of the first things he did when he got to Washington was call on Fred Barnes of The Weekly Standard.

“I’ve met hundreds and hundreds of members of Congress — new ones, old ones, good ones, bad ones,” Barnes told me, “but I still have the capacity to be impressed, and in this case I was. He talked to me about what I soon realized was his great strength, and his great strength as a leader was in electoral politics. He was somebody who knew how to put together majorities, who knew how to win elections.”

McCarthy had raised more than $1 million for his own campaign, but confident that he would win in his heavily Republican district, he spent little of it on himself. He instead wrote checks to Republican candidates who faced tougher races, and traveled the nation to meet them. Barnes had never heard of a first-time candidate working on behalf of other candidates. It was a typical McCarthy move, both canny and generous, and it paid off immediately: Before he was sworn in, he had earned the allegiance of many of his new colleagues.

McCarthy arrived in Washington at a precarious — and opportune  — moment. Democrats had just retaken control of the House and Senate, Republicans were languishing under the deeply unpopular George W. Bush, and conservatives were searching for fresh faces. In 2007, The Weekly Standard published a package of stories that profiled Virginia congressman Eric Cantor, Paul Ryan, and McCarthy, calling them “the Young Guns.” The magazine dubbed Cantor “the leader,” Ryan “the thinker,” and McCarthy “the strategist.” (Barnes’s son eventually went to work for McCarthy’s political fundraising committee.)

At a now-famous dinner of Republican and conservative leaders on the evening of Barack Obama’s 2009 inauguration, McCarthy was one of the more outspoken voices in the room. As recounted in Robert Draper’s When the Tea Party Came to Town, McCarthy argued for a scorched-earth approach in fighting the new president: “We gotta challenge them on every single bill and challenge them on every single campaign.” Then-Speaker John Boehner put McCarthy in charge of candidate recruitment, and he spent the next year crisscrossing the country enlisting people to run in the 2010 midterms.

Rob Stutzman, a GOP political consultant in Sacramento, remembers running into McCarthy in 2009 during a layover at the Denver airport. McCarthy was in the United Airlines lounge, poring over congressional district data. “He’s identified all these seats that they think they can win. He’s on the phone recruiting and finding all these candidates,” Stutzman says. “He is busting his hump and sees this potential: ‘We can win a lot more seats than people think.’”

McCarthy saw potential in relative un-knowns like Kristi Noem, a telegenic rancher and state legislator from South Dakota, and Billy Long, an auctioneer and talk-radio host from southwestern Missouri. Buoyed by the wave of Tea Party activism, Noem, Long, and dozens of others swept into office. Many credited McCarthy for the Republicans’ historic victory — they picked up 63 seats in the House, the largest swing in nearly 70 years — and his ascension within their ranks was assured. McCarthy was elected whip in 2011. With victory, though, came challenges — primarily from his own members, many of whom didn’t share McCarthy’s passion for the deal.

Just as he had in the state Assembly, McCarthy went out of his way to connect with caucus members — inviting them on early-morning bike rides, arranging movie nights, asking them to dinner. Framed photos of Republican House members, in constant rotation, decorate the foyer of his office. And McCarthy has raised at least $36 million over the past decade, much of it to help congressional candidates.  When McCarthy announced his candidacy to be the Speaker of the House in 2015, most assumed the job was his, but at the last minute he pulled out. He didn’t have the support of the Tea Partiers, who viewed him as too close to the establishment.

Along the way, McCarthy became famous for telling his colleagues to “vote your district. Vote your conscience. Just don’t surprise me.” Actor Kevin Spacey picked up the phrase while shadowing McCarthy as he prepared for the role of Frank Underwood on House of Cards. McCarthy initially resisted meeting with Spacey but agreed when he learned that the show’s conniving protagonist would be a Democrat.

In February of last year, when many Republicans were downplaying or outright dismissing Trump’s candidacy, McCarthy went on MSNBC’s Morning Joe and said he thought Trump had a good chance of winning the Republican nomination. The specter of a President Donald Trump — still a punch line at that stage — didn’t seem to rattle McCarthy, not in public at least. “Oh yeah, I think I could work with Donald Trump,” he said.

McCarthy would later tell me, “I do think it’s very helpful to have a disruptor. Having somebody question why we do what we do and still do it that way is very healthy.” There was also something else at work: the shocking defeat of Eric Cantor — one of the Young Guns — in a 2014 primary by an obscure economics professor with little political experience.

Thus McCarthy’s early overtures to Trump were equal parts self-preservation and wanting to maintain good relations with all the factions in the Republican Party, including with the candidate whom party leaders feared the most. Trump, an obsessive TV watcher, took notice. The Morning Joe appearance led to a series of phone calls between the two, and throughout the campaign, McCarthy briefed Trump on the latest developments on Capitol Hill. A month before the election, after Ryan condemned Trump for his lewd and misogynistic comments captured on the Access Hollywood tape, McCarthy served as liaison. “I was one person who talked to everybody,” he told me. “I didn’t want to see either side tear the party apart.”

McCarthy and Trump have only grown closer since. On Inauguration Day, minutes before the ceremony began, the two men found themselves briefly alone inside the Capitol Building. McCarthy thought about how he could be helpful to the man about to take the oath of office. He wanted to make Trump feel protected and calm. He leaned toward the president-elect and said, “You’re gonna do great.” Then they took a selfie. In it, McCarthy’s face is obscured by the shadow of his outstretched arm.

A few minutes later, the new president stood at the podium and attacked the leaders who surrounded him, saying that for too long “the establishment protected itself, but not the citizens of our country.” McCarthy, of course, is one of those leaders. Trump went on to paint a picture of doom, of what he called “American carnage”: impoverished families, crime-ridden streets, and “rusted-out factories scattered like tombstones across the landscape.”

Although McCarthy describes himself as an “optimistic conservative,” he says he was unfazed by the speech. Rather, he heard Trump delivering the same populist message that had led him to victory. It was a message that played especially well in his own district, which gave Trump the largest margin of any congressional district in California.

For McCarthy, Trump’s chaotic style matters less than the fact of his election, which put Republicans in control of Congress and the White House and poised them to reshape the judiciary. Trump’s election was a once-in-a-lifetime opportunity to implement many of the conservatives’ long-desired goals: not just to repeal Obamacare and crack down on illegal immigration but to cut taxes, roll back regulations, and shrink government — what Trump chief strategist Stephen Bannon called the “deconstruction of the administrative state.”

McCarthy played a central role in the passage of the American Health Care Act (AHCA), the Republican-led bill to repeal Obamacare. In March, House Republicans canceled a vote on the bill after McCarthy and the Republican leadership failed to win over the hard-line Freedom Caucus. The defeat embarrassed McCarthy, and in the weeks that followed he kept in constant contact with the GOP’s different factions: the Freedom Caucus, the moderates of the Tuesday Group, and others on the fence. McCarthy and Trump stayed in touch, talking about twice a week as House leaders kept working on the bill.

Then, on May 3, McCarthy broke some news to a scrum of reporters gathered in the Capitol: The House would vote on repeal-and-replace the following afternoon. What’s more, McCarthy guaranteed its passage. At the time, it was far from clear that Republicans had the 216 votes they needed. A handful of McCarthy’s fellow California Republicans who represent swing districts suggested they were more likely to vote no. In the end, McCarthy delivered all 14 Republicans in California’s congressional delegation, many of whom already faced tough re-election campaigns. After the vote, Trump gathered Republican House members in the Rose Garden. McCarthy was giddy. He’d only been there a couple of times, but never to speak publicly. Now he stood at a lectern and praised Trump for being “so hands-on” in the health care debate.

McCarthy’s support for the bill hasn’t gone over well back home. More than 80,000 people in his district have received coverage through the Affordable Care Act, mostly through California’s Medicaid expansion. Before the repeal-and-replace vote, supporters of Obamacare protested outside his house and office. Editorials in The Bakersfield Californian have criticized McCarthy for avoiding town hall meetings and called the House bill a disaster that “would have devastating implications for the community.”

The other major issue affecting his district is immigration. By most estimates, undocumented immigrants make up as much as 70 percent of the agricultural workforce in the Central Valley. More than a third of the residents in his district are Latino. The strip mall where McCarthy opened his deli 30 years ago now houses a Salvadoran pupusa restaurant and a Mexican carniceria.

His position on immigration is quintessentially McCarthyian, balancing the reality of his district — Big Ag’s reliance on undocumented migrant workers — and his party’s increasingly vocal nationalist wing. On the one hand, he supports more funding for border security and a wall on the Mexican border. But he says he also wants an overhaul of the nation’s visa system and a new guest worker program. Children brought here illegally by their parents — the so-called Dreamers — could conceivably have a path to legal status, he says, and deportation efforts should focus primarily on adults who crossed the border without permission.

It’s unlikely Congress will take on immigration reform this year, but McCarthy sees the potential for Trump to broker a major deal. “If Nixon can go to China,” he says, “Trump is the one that could do immigration. If Nixon was the strongest guy against communism, then he was the only person trusted to go and create a relationship with China. Knowing Trump’s position when it comes to immigration, I think he’d have a trust level doing an immigration bill.”

For Arturo Rodriguez, the president of the United Farm Workers of America, whose headquarters are outside Bakersfield, McCarthy’s great failure is that he has not used his influence to lead on immigration reform. “He’s really ignoring what is the heart of this valley, what is the heart of this county and the district he serves,” Rodriguez told me. “Everything revolves around agriculture, and you have to take care of the needs of the workers and the families that live here.”

The most pervasive criticism of McCarthy is not his lack of command of policy but that his primary interest is the game of politics itself — a view summed up by Steve Schilling, who runs a network of health clinics for low-income residents in the Central Valley and has known McCarthy for years.“I haven’t seen a particularly vivid legislative agenda or philosophy come forth from him,” Schilling told me. “It’s more about us versus them. The ability to win the game, if you will, versus attempting to really legislate on behalf of the mass of the people who sent him there.”

Trump’s election has made McCarthy the most powerful Californian in Washington. What that means for his home state, though, is an open question. Last November, California voters rejected Trump by an almost two-to-one margin. Democrats hold every statewide office and supermajorities in both houses of the state legislature, where the dominant conversation revolves around how to resist the president. Most California residents favor strict environmental regulations, oppose a border wall, support access to abortion, and don’t want to repeal Obamacare. Yet if the state has any chance at benefiting from the Trump administration, McCarthy will almost certainly be the reason. One day in March, he spent the morning in the White House alongside Trump and the afternoon behind closed doors in his office with Governor Jerry Brown. It’s difficult to imagine anyone else doing both.

According to Lieutenant Governor Newsom, McCarthy’s biggest contribution to California may wind up being not what he does but what he prevents from happening. Newsom speculated that McCarthy’s firm belief in states’ rights might help California when its policies collide with those of the federal government — about legal marijuana, for example, or strict pollution standards. A well-timed phone call from McCarthy could help avoid a conflict. “It’s the things you don’t see,” Newsom told me, “the things we don’t write about, the headlines that never were, that I think ultimately could mark a collaboration with Kevin.”

Originally published in The California Sunday Magazine in cooperation with CALmatters.