The sudden removal of William Gerstenmaier, NASA's head of human exploration, late Wednesday is a clear sign that the White House is increasingly frustrated with the agency's efforts to return humans to the surface of the moon by 2024.

The Trump administration is laser-focused on that date, which would come during a second term of the Trump presidency, should he be reelected. But despite the mandate, NASA has continued to struggle with delays and cost overruns that have threatened the program. And the ouster of one of the longest-serving stalwarts in the agency shows how far the White House and NASA's politically appointed leadership are willing to go toward disrupting NASA and attempting to break through the bureaucracy that many think has stilted its exploration efforts for years.

In March, Vice President Mike Pence fired the first warning shot, announcing a new, expedited timeline for NASA's moon landing plans. Instead of getting humans there by 2028, he said, its new charge would be within five years. He put NASA leaders on notice, saying that if they couldn't complete the mission, they would be held accountable.

"In order to accomplish this, NASA must transform itself into a leaner, more accountable and more agile organization," he said. "If NASA is not currently capable of landing American astronauts on the moon in five years, we need to change the organization, not the mission."

Industry officials said that Pence and others in the White House have become livid about the agency's lack of progress, particularly regarding the massive rocket known as the Space Launch System, or SLS, that NASA has been developing for more than a decade but has yet to fly. White House officials expressed their dismay to NASA Administrator Jim Bridenstine at a meeting within the last few weeks, according to a space industry official not authorized to speak publicly about internal deliberations.

In an interview Thursday evening, Bridenstine strongly denied that, saying, "If they are frustrated with the agency's efforts, they haven't communicated that to me because we're moving out to get to the moon in 2024." He added: "I just want to be clear - this was my decision. I didn't get this from the White House at all."

There had also been tension between Bridenstine and Gerstenmaier, officials said. Bridenstine repeatedly had said, for example, that he would not cut other programs within the agency to fund the moon program, known as Artemis. But Gerstenmaier contradicted him during an advisory council meeting, saying recently, "We're going to have to look for some efficiencies and make some internal cuts to the agency, and that's where it's going to be hard," he said, according to SpaceNews.

The National Space Council declined to comment, but an administration official said, "This was an internal NASA decision, and Administrator Bridenstine's statement speaks for itself."

Bridenstine said that he thinks "very highly" of Gerstenmaier, said there was no tension between them and praised Gerstenmaier's 42 years of service to the agency. But he added that he had been thinking about making a change for some time and had grown weary of the repeated schedule delays and cost overruns of the hardware needed to meet the White House's 2024 mandate.

"At some point there comes a time for new leadership," he said. "Cost and schedule matter. And I intend to make sure we use every taxpayer dollar wisely."

U.S. Rep. Eddie Bernice Johnson, D-Texas, chairwoman of the House Science, Space and Technology Committee, blasted the decision to so abruptly remove someone with Gerstenmaier's enormous institutional knowledge.

"The Trump administration's ill-defined crash program to land astronauts on the Moon in 2024 was going to be challenging enough to achieve under the best of circumstances," she said in a statement. "Removing experienced engineering leadership from that effort and the rest of the nation's human spaceflight programs at such a crucial point in time seems misguided at best."

The White House, though, is keen to show real progress and tired of reports of delays in some of NASA's most critical programs.

For years, the SLS has faced withering criticism for being perpetually behind schedule and over budget. A recent report, however, caught the White House's attention with its especially grim picture of the program, officials said. The Government Accountability Office found that the cost of the rocket had grown by 30 percent and that the first launch, initially expected in 2017, might not happen until mid-2021.

Despite those problems, NASA continued to pay tens of millions of dollars in "award fees" to Boeing for scoring high on performance evaluations, the report said. Another report highlighted problems with the agency's plan to restore human spaceflight from U.S. soil.

In his speech, Pence also put Boeing and the other companies it works with on notice, saying: "If our current contractors can't meet this objective, then we'll find ones that will."

Space has been a top priority for the White House, which sees exploration as a way to rejuvenate national pride as it commemorates the 50th anniversary of the Apollo 11 moon landing. It has also cast space as a race between superpowers, especially regarding China, which landed a spacecraft on the far side of the moon this year, a historic first.

Trump has pushed for a Space Force, a new branch of the military that would bolster the Pentagon's efforts to defend the critical national security satellites in orbit that provide missile warning, intelligence and communications for soldiers on the battlefield.

The White House also reconstituted the National Space Council, and its first directive in late 2017 was a return to the moon.

A year and a half later, however, the White House is not impressed with the agency's progress in fulfilling that goal. And Gerstenmaier's ouster was seen as a way to shake up the agency, according to industry officials.

Gerstenmaier first came to NASA in 1977, and his career spanned working on the space shuttle program and the International Space Station. More recently, he oversaw the agency's Commercial Crew program, the development of a new generation of spacecraft being built by SpaceX and Boeing that would carry the first NASA astronauts to space from U.S. soil since the space shuttle retired in 2011. He also led the Artemis program.

Along the way, "Gerst," as he is known, has gained the trust of many lawmakers on Capitol Hill, been the enduring face of NASA for international partners and developed a reputation as a low-key, hardworking stalwart of the agency.

His sudden removal was "a shot not across the bow because it hit the bow," said one industrial official. Like several others interviewed for this story, the official spoke on the condition of anonymity to discuss internal deliberations inside NASA and the White House.

"It's a sign to Bridenstine: Get it together, or you're out," the official said. "If Gerst isn't safe, no one is - or maybe just the astronauts currently on the space station."

News of Gerstenmaier's removal broke in an email Bridenstine sent to NASA employees Wednesday evening, hours after Gerstenmaier had testified on Capitol Hill during a House space subcommittee.

"As you know, NASA has been given a bold challenge to put the first woman and the next man on the Moon by 2024, with a focus on the ultimate goal of sending humans to Mars," Bridenstine wrote. "In an effort to meet this challenge, I have decided to make leadership changes to the Human Exploration and Operations (HEO) Mission Directorate."

He said that Ken Bowersox, a former astronaut who had served as the deputy associate administrator for the human exploration office, would take over in an acting capacity.

Bill Hill, who had served with Gerstenmaier as deputy associate administrator in the human exploration office, was also reassigned. He will be a special adviser to Steve Jurczyk, NASA's associate administrator.

Gerstenmaier was scheduled to appear Thursday morning at a symposium in Ohio honoring John Glenn. Bowersox appeared in his place.

He pledged that NASA would reach the moon by 2024.

This article was written by Christian Davenport, a reporter for The Washington Post.