The vote will avoid suspending the work of Federal agencies.
The US House of Representatives overwhelmingly approved a bill to temporarily fund the government by lawmakers from both parties on Tuesday evening.
The vote that cleared the government shutdown came shortly after President Donald Trump won a behind-the-scenes fight to help farmers.
Temporary funding will allow Federal agencies to function until December fully.
This will give lawmakers time to digest the election results and decide whether they should pass laws on annual government funding or leave them to the next administration.
The budget year ends on September 30.
The bill was approved by 359 votes in favor, with 57 against, after behind-the-scenes arguments about the amendments.
The final agreement gives the administration immediate authority to distribute subsidies to the Ministry of agriculture before the election.
House Speaker Nancy Pelosi, a Democrat, backed away from the original draft, which angered not only Republicans but also Democrats from farm States.