Facing the prospect that President Donald Trump could lose his re-election bid, his Cabinet is scrambling to enact regulatory changes affecting millions of Americans in a blitz so rushed it may leave some changes vulnerable to court challenges.

The effort is evident in a broad range of federal agencies and encompasses proposals such as easing limits on how many hours some truckers can spend behind the wheel, giving the government more freedom to collect biometric data and setting federal standards for when workers can be classified as independent contractors rather than employees.

In the bid to lock in new rules before Jan. 20, Trump’s team is limiting or sidestepping requirements for public comment on some of the changes and swatting aside critics who say the administration has failed to carry out sufficiently rigorous analysis.

Some cases, like a new rule to allow railroads to move highly flammable liquefied natural gas on freight trains, have led to warnings of public safety threats.

Every administration pushes to complete as much of its agenda as possible when a president’s term is coming to an end, seeking not just to secure its own legacy but also to tie the hands of any successor who tries to undo its work.

But as Trump completes four years marked by an extensive deregulatory push, the administration’s accelerated effort to put a further stamp on federal rules is drawing questions even from some former top officials who served under Republican presidents.

“Two main hallmarks of a good regulation is sound analysis to support the alternatives chosen and extensive public comment to get broader opinion,” said Susan Dudley, who served as the top White House regulatory official during the George W. Bush administration. “It is a concern if you are bypassing both of those.”

Administration officials said they were simply completing work on issues they have targeted since Trump took office in 2017 promising to curtail the reach of federal regulation.

“President Trump has worked quickly from the beginning of his term to grow the economy by removing the mountain of Obama-Biden job-killing regulations,” Russell Vought, director of the White House Office of Management and Budget, which oversees regulatory policy, said in a statement.

If Democrats take control of Congress, they will have the power to reconsider some of these last-minute regulations through a law last used at the start of Trump’s tenure by Republicans to repeal certain rules enacted at the end of the Obama administration.

But the Trump administration is also working to fill key vacancies on scientific advisory boards with members who will hold their seats far into the next presidential term, committees that play an important role in shaping federal rule-making.

Few of the planned shifts have drawn more scrutiny and criticism than a Labor Department proposal to set federal standards for defining when a worker is an independent contractor or an employee, a step that could affect millions of workers.

The issue has come to a boil as states like California have tried to push companies like Uber and Lyft to classify workers as employees, meaning they would be entitled to benefits such as overtime pay and potentially health insurance, a move that the companies have challenged.

The proposed Labor Department rule creates a so-called economic reality test, such as whether workers set their own schedules or can earn more money by hiring helpers or acquiring new equipment.

The department, in the proposed rule, said it cannot predict how many workers may see their status change as a result of the new definitions because of “uncertainties regarding magnitude and other factors.”

But it is nonetheless pushing to have the rule finished before the end of Trump’s first term, limiting the period of public comment to 30 days, half the amount of time that agencies are supposed to offer.

That has generated letters of protest from Senate Democrats and 22 state attorneys general.

“Workers across the country deserve a chance to fully examine and properly respond to these potentially radical changes,” said a letter organized by Sen. Patty Murray, D-Wash., and signed by 16 other Democratic senators.

The departments of Labor and Homeland Security are using a tactic known as an interim final rule, more typically reserved for emergencies, to skip the public comment period entirely and to immediately enact two regulations that put much tougher restrictions on work visas for immigrants with special skills.

The Homeland Security Department is also moving, again with an unusually short 30-day comment period, to adopt a rule that will allow it to collect much more extensive biometric data from individuals applying for citizenship, including voice, iris and facial recognition scans, instead of just the traditional fingerprint scan. The measure, which the agency said was needed to curb fraud, would also allow it for the first time to collect DNA or DNA test results to verify a relationship between an application for citizenship and someone already in the United States.

A third proposed new Homeland Security rule would require sponsors of immigrants to do more to prove they have the financial means to support the individual they are backing, including three years’ worth of credit reports, credit scores, income tax returns and bank records. Anyone who accepted welfare benefits during the previous three years would be unable to sponsor an immigrant unless a second person agrees to do so.

The agency is limiting public comment on that change to 30 days as well.

The rules intended to tighten immigration standards come at a considerable cost, estimated to be more than $6 billion just for the new demands related to immigrants’ biometric data and proof of financial capacity for those sponsoring immigrants.

The Environmental Protection Agency, which since the start of the Trump administration has been moving at a high speed to rewrite federal regulations, is expected to complete work in the weeks that remain in Trump’s term on two of the nation’s most important air pollution rules: standards that regulate particulates and ozone emitted by factories, power plants, car exhaust and other sources.

These two pollutants are blamed for bronchitis, asthma, lung cancer and other ailments, causing an estimated 7,140 premature deaths a year in the United States, according to one recent study. The agency is proposing to keep these standards at their current levels, provoking protests from health experts and environmentalists who argue the agency is obligated to lower the limits after new evidence emerged about the harm the pollutants cause.

The agency also is rushing to complete a series of regulations that will almost certainly make it harder for future administrations to tighten air pollution and other environmental standards, including a limit on how science is used in rule-making and a change to the way costs and benefits are evaluated to justify new rules.