In recent days, as the coronavirus pandemic has ravaged the country, President Trump’s administration has ousted two key inspectors general, moved to weaken federal gas mileage standards, nominated a young conservative for a powerful appeals court and sent scores of immigrants back across the southern border without a customary hearing.

It’s a whirlwind of activity taking place away from the spotlight that highlights how the twin crises of a viral outbreak and an economic slowdown have not slowed Trump’s aggressive push to advance his broader agenda in the months before he faces voters.

In some cases, Trump is continuing to do what he had been doing, pushing policies that have won him plaudits among his conservative supporters. In others, he is using the broad powers granted to the executive branch amid a national crisis to pursue policy goals he has long sought and in some cases struggled to achieve.

“The federal government has done a lot, and it’s going to do a lot,” Trump said Tuesday during a briefing at the White House. “We’re going to do, perhaps, infrastructure, which you wouldn’t have gotten approved before. And now people are looking to do it.”

Given Trump’s long-standing high metabolism for controversy and scandal, he is uniquely positioned to take advantage of a deadly pandemic in ways that previous presidents would never have considered, said Max Skidmore, a political science professor at the University of Missouri at Kansas City and the author of a book on presidential responses to pandemics.

“Normally when a crisis occurs — whether it’s a military attack or something else on this scale — it absorbs all the energy and demands that all energy available be directed to the solution of that particular problem,” he said. “It’s very rare for president to use that in such a way to pursue other items on the agenda.”

Perhaps following the mantra of former Obama White House chief of staff Rahm Emanuel to “never allow a crisis to go to waste,” the Trump administration has moved with speed to advance the president’s goals as a pandemic upends much of the country and renders traditional campaigning impossible.

Trump’s extracurricular activities are drawing growing criticism. As the president’s focus has regularly drifted away from the crisis at hand, he has struggled to answer questions about whether he took the viral outbreak seriously enough during its crucial early stages. As the death toll has spiked in the United States, reports have surfaced suggesting that he did not.

When Health and Human Services Secretary Alex Azar tried to warn Trump about the viral outbreak in January, the president instead changed topics to air complaints about an aborted federal ban on vaping products, The Washington Post has previously reported.

In the ensuing weeks, Trump has since pushed tighter immigration controls, relaxed environmental regulations, pursued tax cuts, advocated stricter curbs on voting, sought to undermine the Affordable Care Act and authorized a military operation against Central American cartels.

White House officials said Trump is squarely focused on the pandemic, not politics.

“The bold and decisive actions this President has taken throughout this pandemic are purely about protecting the public health,” White House spokesman Judd Deere said in a statement, adding, “whether it be providing food to children impacted by school closures, closing our border to certain countries and regions where the virus is spreading, or pausing all interest on student loans, this President wants us to put politics aside and come together to make sure we emerge from this crisis healthy, safe, and strong.”

Turnover, staff infighting and abrupt firings have been a trademark of the Trump administration since its earliest days, and that dynamic has not changed in the midst of the pandemic.

On Tuesday, Trump’s new chief of staff, Mark Meadows, who began his job last week, brought on a new communications team, including appointing the White House’s fourth press secretary in just over three years. Meadows himself was appointed to be Trump’s fourth chief of staff in the middle of the crisis, after the president decided to replace Mick Mulvaney.

Trump has also stepped up his aggressive actions toward agency inspectors general, officials charged with serving as independent watchdogs but who Trump claims are part of a “deep state” campaign against him.

He made a reference Tuesday to naming seven new inspectors general, a nod to the aggressive moves he has made in recent days to curb oversight and to push out government officials seen as insufficiently loyal.

“We have about seven nominations in. I believe we put seven very, very highly qualified people for the IG position,” Trump said Tuesday, acknowledging that he could’ve made the moves “three years ago” but decided to do so in the middle of a pandemic.

Trump’s abrupt Friday-night firing of Michael Atkinson, the inspector general for the intelligence community, indicated that the purge of central players in the impeachment process had not been tempered by the novel coronavirus outbreak. Atkinson had alerted Congress about a whistleblower complaint that led to Trump’s impeachment over his actions toward Ukraine.

In fact, Trump’s broader efforts to undermine independent oversight may have accelerated amid a crisis that has ravaged the economy and pushed Congress to spend trillions of dollars in stimulus.

Trump replaced the Defense Department’s acting inspector general, Glenn Fine, on Tuesday — removing an official who had been slated to lead efforts to oversee his administration’s management of the $2 trillion coronavirus stimulus package.

Trump has approached the coronavirus crisis as “the perfect occasion” to ramp up his push to consolidate power and curb oversight, said Noah Bookbinder, the executive director of Citizens for Responsibility and Ethics in Washington.

“Because people are preoccupied, there is going to be less pushback,” he said. “He’s going to continue these attacks on independent oversight as long as he feels that there is cover to do so.”

Some of Trump’s defenders say the president is right to continue pushing his agenda during the pandemic.

“Many of the president’s policy ideas preceded this crisis, and it’s appropriate for him to enact laws,” said Ari Fleischer, a former press secretary for President George W. Bush. “It is a part of the president’s mission to keep America moving forward on all fronts.”

Fleischer pointed out that Bush signed his signature “No Child Left Behind” education law in January 2002, less than four months after the 9/11 attacks.

The coronavirus outbreak has allowed Trump to step up his campaign to restrict immigration, including by effectively shutting down unauthorized crossings at the southern border. Using emergency powers ostensibly linked to the coronavirus crisis, Trump has implemented immigration restrictions that he has long tried to enforce, only to be blocked by courts and regulations. The new policies, which effectively suspend laws protecting minors and asylum seekers, allow border agents to quickly deport or turn away people seeking to enter the country.

Trump, who has long railed against the standard due process protections available for migrants fleeing persecution, has finally been able to bypass them, at least temporarily.

The Trump administration says the new border restrictions are an effort to protect the country from the spread of the coronavirus, even though Mexico has far fewer cases than the United States. “We need the Wall more than ever!” he tweeted last month.

Still, Trump has also used the platform of the virus response to make unprompted references to the construction of a border wall, regularly mentioning the campaign promise during televised coronavirus briefings.

Trump’s push to relax environmental regulations has also accelerated in recent weeks, with the Environmental Protection Agency and the Interior Department pushing forward with major initiatives.

Last week, the EPA moved to finalize a rule to weaken the federal government’s gas mileage standards, rolling back Obama’s most significant effort to combat climate change — a longtime goal for Trump. The move, which dramatically scales back requirements for fuel efficiency improvements, came on the same day that Trump warned Americans to brace for a “very, very painful two weeks,” and ultimately for as many as 240,000 coronavirus deaths.

“Our country is in the midst of a great national trial unlike any it has ever faced before,” he said.

The EPA has plowed ahead with its deregulatory agenda. Last month, the agency issued a memo instructing petrochemical plants, power companies and other major industries that they could monitor their own pollution levels during the virus outbreak.

The Interior Department has moved forward with several oil and gas lease sales and dozens of other actions in the past month, according to an analysis released Tuesday by the Center for Western Priorities, a conservation group. The agency has ignored requests to suspend rulemaking during the pandemic.

Trump himself has broken away from coronavirus messaging to tout the construction of the Keystone XL pipeline, which received a key approval from Interior in late January and began construction this month.

“GREAT news this week regarding the Keystone XL pipeline — moving forward with fantastic paying CONSTRUCTION jobs for hardworking Americans,” Trump tweeted on April 3. “Promises Made, Promises Kept!”

Trump’s efforts to remake the federal judiciary are also moving apace, including his nomination Friday of a 37-year-old judge to fill a vacancy on the powerful U.S. Court of Appeals for the District of Columbia Circuit.

The Trump administration has continued its efforts to eliminate the Affordable Care Act through the courts, with the president opting against reopening the Obamacare exchanges to provide health-care options to the unemployed.

At the Agriculture Department, the crisis has allowed officials to move ahead with a program to deliver of food boxes for rural communities. The administration’s earlier efforts to save money by substituting traditional food stamps with government “harvest boxes” have repeatedly been rejected by Congress.

Trump has also used the coronavirus task force briefings to showcase his administration’s efforts to combat drug cartels in Central America, to call for new tax deductions for corporations and to push for nationwide voter-ID laws. He has also called for a $2 trillion infrastructure package.

Democrats have sought to take advantage of the crisis as well, with some arguing in favor of long-sought policies ranging from eliminating student loan debt to universal basic income to nationwide vote-by-mail.

On Wednesday, House Speaker Nancy Pelosi (D-Calif.) and Senate Minority Leader Charles E. Schumer (D-N.Y.) countered the Trump administration’s request for $250 billion in small-business funding with a call for hundreds of billions of dollars for hospitals, local governments and food stamp recipients.

“The American people need to know that their government is there for them in their time of great need,” they said in a statement.

Arelis R. Hernández, Nick Miroff, Juliet Eilperin, Brady Dennis, Josh Dawsey, Ashley Parker and Yasmeen Abutaleb contributed to this report.