Just days into his second term, President Trump said he was going to recommend that the Federal Emergency Management Agency "go away," dismissing the agency as bloated and ineffective.
Kristi Noem, the secretary of homeland security, was even blunter during a March cabinet meeting when she said point-blank: "We are going to eliminate FEMA."
But now, as the administration contends with the deadly flooding in Texas, Mr. Trump and his aides are no longer speaking about a wholesale demolishing of the agency. With the nation's attention focused on the need for the federal government to effectively respond to disasters, White House officials are emphasizing instead their plans to overhaul the agency, saying that was the intent all along.
"We want FEMA to work well," Russell T. Vought, the director of the Office of Management and Budget, told reporters on Friday. "And, you know, the president is going to continue to be asking tough questions from all of his agencies."
The whipsawing remarks have added to a sense of confusion about the future of FEMA, which is struggling with the loss of top officials, including the departure of Cameron Hamilton as its acting director in May. Mr. Hamilton was pushed out of the job after he told members of Congress that the agency was vital to communities "in their greatest times of need," shortly after Ms. Noem testified that "FEMA as it exists today should be eliminated."
FEMA, established in 1979 by President Jimmy Carter, coordinates the federal response to disasters, serving as a backstop for states if they cannot meet the needs on the ground.
In his criticism of the agency, Mr. Trump has argued that states, not the federal government, should take the lead in responding to disasters, which is how the system currently works.
His exact position on what should be the fate of FEMA has been hard to nail down. At some points, the president has talked doing away with it.
During a trip to hurricane-ravaged North Carolina in January, Mr. Trump attacked the agency relentlessly. He said FEMA was "not doing their job" and described it as a "disaster."
At other times, he and his cabinet officials have described shrinking FEMA or changing its role. In late January, he signed an executive order that created a review council to assess FEMA and recommend improvements.
At a cabinet meeting this week, Ms. Noem had also changed her tune, telling the president that the agency was working efficiently in its response to the Texas floods.
"We're cutting through the paperwork of the old FEMA, streamlining it much like your vision of how FEMA should operate," Ms. Noem said.
And during a visit to the disaster zone in Texas on Friday, Mr. Trump suggested the agency was already on a better path, thanks to his hires.
"We have some good people running FEMA," the president said. "It's about time, right? We get some good ones. They failed us in North Carolina, but when we got in on Jan. 20, they fixed it up in no time."
The White House maintained on Friday that Mr. Trump's plan had always been to reform the agency.
"The president's goal has always been to turn FEMA into a more efficient and productive agency that actually empowers states from the ground up, rather than bogging them down," said the White House press secretary, Karoline Leavitt. "The Trump administration's response to the tragic floods in Texas was swift and successful because President Trump allowed state and local officials who are actually on the ground to lead. Further changes to FEMA will be determined and announced in the near future."
On Friday, Mr. Vought said that FEMA had $13 billion in its reserves and that Texas would get "anything it needs" to deal with the aftermath of the devastating floods. Officials said more than 170 people in Texas were still missing. Twenty-seven campers and staff members were reported dead, and several were still missing at Camp Mystic, a girls summer camp on the banks of the Guadalupe River.
Even as White House officials trumpeted the federal response, there have been indications that FEMA was slow to activate certain teams that coordinate response and search-and-rescue efforts, as The New York Times previously reported. A policy put in place in June by Ms. Noem requires all expenses over $100,000 -- including the deployment of search-and-rescue teams -- to be approved directly by her.
FEMA also failed to answer nearly two-thirds of calls to its disaster assistance line two days after the flooding, The Times reported, after the agency fired hundreds of contractors at call centers.
Democrats on the House Oversight Committee have sent letters to the administration demanding answers about the lead-up and response to the flooding and preparedness for future emergencies.
"We are deeply concerned not only that Secretary Noem may have effectively crippled the agency's ability to respond to this crisis, but also that she failed to personally act to ensure a timely response," they wrote.
The administration defended its response and said the changes it planned to make would help fulfill its mission.
"Federal emergency management will shift from bloated, D.C.-centric dead weight to a lean, deployable disaster force that empowers state actors to provide relief for their citizens," said Tricia McLaughlin, a spokeswoman for the Department of Homeland Security.
Andrew Morris, a professor of history at Union College, said that for decades the federal government's role in providing emergency relief to states after disasters was an uncontroversial, bipartisan issue.
"There's nothing sacrosanct about FEMA as an administrative entity; any bureaucracy has problems open to potential reform," he said. "But what seems to have been their intent is a more general retrenchment of the federal role and pushing much more responsibility, and especially fiscal responsibility, down to the states. And when you have these big disasters, they can outstrip the ability of any given state or locality to do it themselves."
Mr. Morris, who is the author of "When Natural Disasters Became National Disasters: Hurricane Camille and the New Politics of Disaster Relief," said the agency operated better when it was independent of the Department of Homeland Security.
"I don't see any indication from the administration that shuffling the deck chairs is going to produce a better result," he said. "If they want to make it more nimble and service oriented, I would suggest making it, once again, a free-standing federal agency."
Christopher Flavelle, Zolan Kanno-Youngs and Tyler Pager contributed reporting.