WASHINGTON — The Trump administration violated the law when it halted funding under a $5 billion federal infrastructure program, according to a nonpartisan government watchdog, which concluded Thursday that officials should restore the aid for electric vehicle charging stations as authorized by Congress. The findings appeared to inch the government closer to a high-stakes constitutional showdown, as President Donald Trump increasingly claims expansive powers to defy lawmakers and control the nation’s purse strings as part of his broad reorganization of U.S. government.

The allegations arise from Trump’s first days in office, when he and his administration raced to block vast swaths of the federal budget seen as incompatible with his political beliefs.

One of the president’s targets was the National Electric Vehicle Infrastructure program, a roughly $5 billion tranche of money enacted as part of the bipartisan infrastructure law in 2021 to create a national network of charging stations. Trump and his allies had long denounced that money as wasteful, and the Transportation Department froze the program’s continued funding in February. Reviewing that action, the Government Accountability Office determined Thursday that the funding halt had amounted to an improper impoundment, since the administration had denied money to states that lawmakers had previously approved. The government “must continue to carry out the statutory requirements of the program,” the watchdog said.

Impoundments are restricted under a 1970s law that also empowers the accountability office to monitor — and, potentially, to go to court — to force the release of frozen money. The Government Accountability Office is a nonpartisan arm of Congress with a vast remit, including the responsibility to monitor the nation’s spending.

“GAO’s opinion is incorrect,” a spokesperson for the White House budget office said in a statement Thursday, adding that the Transportation Department was “appropriately using” its authority under the law to review states’ plans for federal infrastructure money.