WASHINGTON – Since the first days after she was elected governor of South Dakota in 2018, Kristi Noem had been working to ensure that President Donald Trump would come to Mount Rushmore for a fireworks-filled July Fourth extravaganza.

After all, the president had told her in the Oval Office that he aspired to have his image etched on the monument. And last year, a White House aide reached out to the governor’s office with a question, according to a Republican official familiar with the conversation: What’s the process to add additional presidents to Mount Rushmore?

So last month, when the president arrived in the Black Hills for the star-spangled spectacle he had pined for, Noem made the most of it.

Introducing Trump against the floodlit backdrop of his carved predecessors, the governor played to the president’s craving for adulation by noting that in just three days more than 125,000 people had signed up for only 7,500 seats; she likened him to Theodore Roosevelt, a leader who “braves the dangers of the arena”; and she mimicked the president’s rhetoric by scorning protesters who she said were seeking to discredit the country’s founders.

In private, the efforts to charm Trump were more pointed, according to a person familiar with the episode: Noem greeted him with a 4-foot replica of Mount Rushmore that included a fifth presidential likeness: his.

But less than three weeks later, Noem came to the White House with far less fanfare — to meet not with Trump, but with Vice President Mike Pence. Word had circulated through the Trump administration that she was ingratiating herself with the president, fueling suspicions that there might have been a discussion about her serving as his running mate in November. Noem assured Pence that she wanted to help the ticket however she could, according to an official present.

She never stated it directly, but the vice president found her message clear: She was not after his job.

There is no indication Trump wants to replace Pence. Trump last month told Fox News that he’s sticking with Pence, whom he called a “friend.”

Yet with polls showing the president trailing Joe Biden, the presumptive Democratic nominee, and Republicans at risk of being shut out of power in Congress, a host of party leaders have begun eyeing the future, maneuvering around a mercurial president.

Sen. Tom Cotton of Arkansas was in New Hampshire late last month, Sen. Rick Scott of Florida is angling to take over the Senate Republican campaign arm to cultivate donors, and Rep. Liz Cheney of Wyoming is defending Dr. Anthony Fauci, the government’s leading expert on infectious disease, while separating herself from Trump on some national security issues.

At the same time, Secretary of State Mike Pompeo is attempting to shore up his conservative credentials by pushing a hard line on China, and Sens. Ted Cruz of Texas and Rand Paul of Kentucky are attempting to reclaim their standing as fiscal hawks by loudly opposing additional spending on coronavirus relief.

Drawing less attention, but working equally hard to burnish her national profile, is Noem. The governor, 48, has installed a TV studio in her state capitol, become a Fox News regular and started taking advice from Trump’s former 2016 campaign manager, Corey Lewandowski, who still has the president’s ear.

Next month, she’ll address a county Republican dinner in Iowa.

“There seems like there might be some interest on her part — it certainly gets noticed,” Jon Hansen, a Republican state representative in South Dakota, said of Noem’s positioning for national office.

Her efforts have paid off, as evidenced by the news-driving celebration at Mount Rushmore. Yet Noem’s attempts to raise her profile have not been without complications. And they illustrate the risks in political maneuvering with a president who has little restraint when it comes to confidentiality, and a White House that shares his obsession about, and antenna for, palace intrigue.

To the surprise of some of her own advisers, Noem flew with Trump to Washington on Air Force One late in the evening after his Mount Rushmore speech. Joined by Lewandowski, she and the president spoke for over an hour privately during the flight — a fact that Trump and some of his aides soon shared with other Republicans, according to officials familiar with his disclosure.

An aide to Noem, Maggie Seidel, said she did not raise the vice presidency with Trump. Lewandowski, who is a paid adviser to the Pence-aligned Great America PAC, also denied that he or the governor ever raised the subject of replacing Pence on the ticket.

Lewandowski, in a brief interview, described Noem as a star who “has a huge future in Republican politics.”

A White House official laughed at the notion that Trump is open to replacing Pence, a move that, among other things, would exude desperation. And regarding the phone call about adding the president’s image to Rushmore, the official noted that it is a federal, not state, monument.

Still, word of the Air Force One conversation quickly reached White House officials, including those in Pence’s office.

A short time later, Noem was jetting back to the capital, this time in less grand fashion, after requesting a meeting with Pence.

White House aides kept Noem from meeting with Trump again, one person familiar with the planning said. But Pence’s office gladly put his session with the governor on his public schedule and the vice president tweeted about it afterward. Noem’s aides, hoping to tamp down questions about the second trip, emphasized that she had also met with officials from the Department of Health and Human Services and other agencies while she was in the capital.

One official close to the vice president said that Noem did not discuss her Air Force One flight with Pence but used the conversation to say she wanted to help the campaign however she could. The official suggested that the vice president’s team has an opportunity for her in mind: helping Pence prepare to debate whichever woman Biden selects as his running mate.

Yet one senior Trump adviser has recently lamented to others that Trump could have boosted his reelection campaign had he replaced Pence with a woman, according to people familiar with the conversations. One potential candidate mentioned was Nikki Haley, the former United Nations ambassador who is close to the president’s daughter and son-in-law, Ivanka Trump and Jared Kushner.

However, Pence has been an unstinting ally of Trump, and the vice president retains a number of allies in the president’s orbit.

“I think we’ll win South Dakota either way,” Brian Ballard, a lobbyist close to Trump, said.

That these kinds of speculative conversations about a different running mate have taken place at all, though, illustrates the depth of frustration in Trump’s inner circle over his political fortunes. With early voting starting in less than two months in some states, the president’s ineffectual response to the coronavirus has alienated voters and made the election primarily a referendum on him.

Speculation has long lingered in Republican circles that Trump could swap out Pence for Haley, partly because of the president’s own musings about it.

For a time in 2018, Trump queried people about Pence’s loyalty. And officials in the administration, including some close to Pence, said they believed that Kushner and Ivanka Trump were angling to replace him with Haley.

In his memoir, “The Room Where It Happened,” the former national security adviser John Bolton recounts how, flying to Iraq on Christmas night in 2018, the president asked him for his opinion on jettisoning Pence.

Noem, the daughter of a rancher who took over her family’s property after her father died, has insisted that she has little appetite to return to Washington, where she served as South Dakota’s sole House member for eight years before becoming governor.

“She’s focused on being the governor of South Dakota,” said Seidel, her senior adviser.

The president’s transition team contacted her about interviewing for a Cabinet post after the 2016 election, but she was already planning to run for governor then. Some of her allies believe she’d also be open to the interior or agricultural secretary roles in a second Trump term before the 2024 race.

Noem’s poll numbers have increased after a difficult first year in office. But to some of her aides, Lewandowski, a hard-charging New Englander, has been a disruptive presence in Pierre, South Dakota’s small state capital. He appeared as a guest speaker at one luncheon with cabinet officials and pressed the governor’s appointees to make a more aggressive case for her, irritating the state officials, according to a person briefed on the events.

The governor is now on her third chief of staff because the last one, Joshua Shields, left in part because of the increased role of Lewandowski, according to South Dakota Republicans.

Lewandowski has sought opportunities that could benefit both Trump and Noem. He recently discussed with the president’s advisers sending Trump to the annual motorcycle rally in Sturgis, South Dakota, where there would be a big crowd and where the two might have appeared together again; Trump’s aides did not want him in the same politically safe state twice in two months.

Noem has been a steadfast ally of Trump and has mirrored his handling of the virus.

She has pushed for schools to reopen for in-person classes, denounced mask mandates and had South Dakota participate in a study on hydroxychloroquine, the malaria treatment Trump has trumpeted.

It was her star turn at Mount Rushmore, though, that has gotten Republicans talking and been a boon to South Dakota tourism, the state’s second-largest industry.

Recognizing the president’s immense interest in the monument, Noem worked with his Interior Department to ensure there would be fireworks for the celebration, a long-standing priority for Trump. There had been no fireworks there for the previous decade because of environmental and fire-risk concerns.

In the weeks leading up to the event, Noem went on Laura Ingraham’s show on Fox News to make clear she was expecting to “have a large event” for the president and would not require social distancing or masks.

Then, as the president sat watching her remarks in a bunting-wrapped box just offstage, she praised America as a place where someone who was “just a farm kid” could become “the first female governor of South Dakota.”