WASHINGTON>> John Thune won election to the Senate in 2004 by conquering Sen. Tom Daschle, the powerful Democratic leader, only to quickly face a mortal threat to his political future when a major Air Force base in his state was threatened with closure.

He beat back the effort and saved Ellsworth Air Force Base, a financial engine in his largely rural state, keeping his job and learning valuable lessons that have helped power his rise in the Senate.

Now Thune, R-S.D., has ascended to the top and on Friday became the Senate majority leader in the new Congress. Again he is facing an early challenge and a major threat to his political standing.

Thune’s task this time is to juggle President-elect Donald Trump’s demands, the competing desires of 53 GOP senators and a formidable legislative agenda. It starts with shepherding multiple baggage-laden Trump nominees to confirmation in the closely divided Senate, where he can afford to lose no more than three Republican votes if Democrats hold together in opposition.

At the same time, he intends to use a tricky maneuver to steer around a filibuster and pass a combination border security, military spending and energy production bill that will require serious legislative finesse. And he wants to do it in the first month or so, while also reordering how and how often the Senate works. It is a tall order for the 6-foot-4 former all-state basketball player, a crack shot who is passionate about pheasant hunting and who turns 64 in a few days.

“Let’s just say he’s got a lot of interests to balance to cement his credibility,” said Sen. Kevin Cramer, a Republican from bordering North Dakota who endorsed Thune for leader, noting that his colleague had never lied to him.

Those in Thune’s orbit say a stinging defeat in a 2002 Senate bid, the momentous campaign against Daschle two years later and then the battle to save Ellsworth toughened and educated Thune about political realities. But he had already exhibited a pronounced aversion to losing during his days playing basketball for the high school team in his tiny hometown, Murdo, S.D., and later at Biola University, a private Christian college in California.

“It was just absolutely insane how competitive he was,” said his younger brother, Tim, who shared a bedroom with him in their 800-square-foot home and shot baskets on the hard-packed dirt court in their yard. “He always wanted the ball. When it was clutch time, he wanted the ball.”

Thune considered but dropped the idea of running for president in 2012 and contemplated retiring from the Senate in 2022. But at the urging of Sen. Mitch McConnell, R-Ky., the outgoing party leader, and the lure of a future vacancy when McConnell stepped aside, Thune decided to stick around, saying he was willing to continue doing the work “even when it was hard, uncomfortable or unpopular.”

Despite his decision to remain, he was no lock to replace McConnell after his 18-year run as leader, and he faced a tough challenge from Sen. John Cornyn, R-Texas. Cornyn, like Thune, served as McConnell’s No. 2 for a stretch and was considered to have sharper political skills.

But Thune got a bit of a test run at the top when McConnell was absent with health issues in 2023, and his colleagues liked what they saw. He spent months raising money, campaigning for Senate candidates and promising to be a consensus builder, offering an approach different from McConnell’s top-down, insular leadership style. He won the race on the second ballot in a result interpreted by many as a sign that Senate Republicans wanted a leader willing to keep at least some distance from Trump.

His allies, while acknowledging that his temperament differs vastly from McConnell’s, say Thune can take the heat.

“He is a smart guy. He is astute. He is able to make hard decisions when he needs to,” his brother said. “Criticism is something he has learned to take. He will process it, and if it is legitimate and valid, he will learn from it.”

The person Thune might find hardest to please is Trump, who was agitated by Thune’s past criticism of his conduct and incensed that the Senate’s No. 2 Republican did not back his 2020 election challenge.

He since has taken steps to repair relations with Trump, including making a pilgrimage to Mar-a-Lago, the president-elect’s estate and private resort in Florida. The pair seem to have settled into a working relationship after Trump stayed out of the leadership race despite a push by some of his advisers to try to block Thune.