WASHINGTON (Reuters) - President Donald Trump signed legislation on Thursday that will extend funding for a wide range of federal agencies through Dec. 20 and avoid partial government shutdowns that otherwise would have begun on Friday.

Slideshow ( 2 images )

An administration official said Trump signed the bill that was approved by the Republican-led Senate earlier on Thursday by a vote of 74-20. The Democratic-led House of Representatives passed the measure on Tuesday by a vote of 231-192, with all but a dozen Republicans voting against the funding.

Between now and Dec. 20, House and Senate negotiators will seek agreement on how to divvy up money across all of the federal bureaucracy. They are hoping to come up with legislation to keep the government operating through Sept. 30, 2020, the end of this fiscal year.

But their work, already arduous, could be further complicated by the highly charged impeachment investigation against Trump that Democrats are running in the House.

By December, the House could be in a full-blown debate over whether the Republican president should be removed from office. The House Intelligence Committee is probing whether Trump asked Ukraine to investigate Democratic political rival Joe Biden in return for a White House meeting or the release of U.S. security aid.

Trump denies doing anything improper.

It is possible the impeachment debate could be reaching a crescendo in the House just as the Dec. 20 deadline is nearing and when federal funding would again expire unless Congress and Trump reach a deal.

Much of the hang-up over the spending bills for the current fiscal year, which began on Oct. 1, is over Trump’s demand for billions of dollars to build a wall along the U.S.-Mexico border.

Trump made his pledge to build such a wall a centerpiece of his 2016 campaign for president, although he assured voters at the time that Mexico would pay for the construction - an idea Mexico has roundly rejected.

Having failed to persuade Congress to grant him the money for his border wall, Trump has used “emergency” authority to shift funding to the wall from various projects, raising the ire of Democrats.