Senior Trump administration officials in recent days threatened a presidential veto that could have led to a government shutdown if House Democrats refused to drop language requiring prompt release of future military aid for Ukraine, according to five administration and congressional officials.

The language was ultimately left out of mammoth year-end spending legislation that passed the House and Senate this week ahead of a Saturday shutdown deadline. The White House said President Trump signed the $1.4 trillion package Friday night.

The Ukraine provision was one of several items the White House drew a hard line on during negotiations to finalize the spending legislation, according to the officials, who spoke on the condition of anonymity to discuss the developments. It would have required the White House to swiftly release $250 million in defense money for Ukraine that was part of the spending package.

The White House this year refused to release congressionally appropriated defense aid to Kyiv during a period when President Trump had asked Ukrainian President Volodymyr Zelensky to investigate former vice president and 2020 candidate Joe Biden and his son Hunter, who had served on the board of a Ukrainian gas company. Trump’s request of Zelensky as the White House delayed the aid was at the heart of House Democrats’ decision to impeach Trump this week on charges of abuse of power and obstruction of Congress.

Attempting to prevent the White House from withholding Ukraine aid again, House Democrats tried to insert language in this week’s spending package that would have required the White House Office of Management and Budget to sign off on and release Pentagon funding for Ukraine within 45 days. But as talks on the budget package reached their conclusion in the days ahead of the impeachment vote, Treasury Secretary Steven Mnuchin and White House legislative affairs director Eric Ueland made clear that the Ukraine provision was among a handful of absolute non-starters for Trump.

“We made crystal clear that no restriction on the president’s apportionment powers would be acceptable to him regardless of topic,” Ueland said in an interview Friday. “And through a lot of negotiation and work back and forth, the administration and Congress were able to reach an appropriate outcome on that issue.”

House Democrats led by Speaker Nancy Pelosi (D-Calif.) agreed to the administration’s demands, and the provision was dropped. If they had not, the White House could have issued a public veto threat and raised the prospect of an imminent government shutdown in the days before Democrats moved to impeach the president. Such a scenario would have injected yet more chaos into a Capitol riven by partisan warfare.

Ueland and other administration officials said they objected not because the issue related to Ukraine, but to protect executive branch authorities over how the White House handles funding streams that have been approved by Congress.

The impeachment inquiry focused in part on a Pentagon program called the Ukraine Security Assistance Initiative and how it was handled for the 2019 fiscal year. Trump ultimately allowed the money in the program to be released in September after a whistleblower complaint about his July 25 phone call with Zelensky made its way to Capitol Hill. The Ukraine provision that was kept out of this week’s spending bill involved the same program and the same amount of money, but for the 2020 fiscal year, which ends next September. The language would have given the Pentagon a green light to spend Ukraine Security Assistance Initiative money for 2020 within 45 days of enactment of the spending package, by forcing OMB to release it.

Although appropriations bills are stuffed with arcane language about how and when money should be spent, the provision Democrats sought to insert on the Ukraine program was unusual, reflecting deep concerns on the part of lawmakers.

Another related provision was also dropped from the spending bill at the last minute at the insistence of the White House. This one would have required “apportionment letters” produced by the White House Office of Management and Budget to be made public. Apportionment letters are the tools OMB uses to authorize release of congressionally appropriated money to agencies. This year, OMB used these apportionment letters to hold up release of the Ukraine aid.

The language on the apportionment letters in the spending package was actually written by Democrats before the Ukraine controversy flared. It originated with Democratic concerns over how the administration was handling funds Congress had appropriated for Puerto Rico and reflected broader concerns among Democrats about how OMB is exercising its authority over money Congress had already authorized to be spent.

Pelosi’s spokesman, Drew Hammill, downplayed the disputes and Pelosi’s role in them.

“These issues were negotiated primarily by the Appropriations Committee and OMB,” Hammill said. “These matters were two among dozens that had to be resolved in order to reach agreement on the two [spending bills] between both Houses of Congress and the White House."

Hammill added that if Democrats had refused to exclude the language, it likely would have resulted in a government shutdown.