WASHINGTON — President Trump’s advisers rejected a bid to force his administration to quickly release military assistance for Ukraine early next year, threatening in recent weeks that he would veto must-pass spending legislation if Congress did not remove the directive.

According to three officials familiar with the discussions, Democrats ultimately agreed to drop the language, which would have forced the administration to release $250 million in defense aid to Ukraine within 45 days of enactment of the spending package, in order to avoid a government shutdown. Mr. Trump signed the $1.4 trillion in spending legislation late Friday, hours after signing a critical defense policy bill while at Joint Base Andrews to leave for his holiday break at his Florida estate.

The discussion in the final days of negotiations over a dozen spending bills, first reported by The Washington Post, came after the administration’s decision to withhold Ukraine military assistance became a central issue in the inquiry that led to Mr. Trump’s impeachment this week for abuse of power and obstruction of Congress. The officials who described the discussions did so on the condition of anonymity because the talks were private.