The House of Representatives on Tuesday night approved a stopgap spending bill to run the government through March 23 and bolster defense funding, sending the bill to the Senate for consideration.

The vote was 245 to 182. Eight Republicans voted no, while 17 Democrats voted yes.

This is the first step in averting a possible government shutdown before 11:59:59 p.m. ET Thursday.

It's unclear how the bill may fare in the Senate, although lawmakers there could strike the defense spending plan and zap the package back to the House.

Both parties are in negotiations trying to secure an agreement on raising caps for both defense and non-defense spending, which could be the key to unlock Congress' fiscal issues, while also funding the government.

Democratic leaders have dropped their strategy of using the funding fight to extract concessions on immigration, specifically on seeking extended protections for the "Dreamer" immigrants who have lived in the country illegally since they were children. Instead, the Democrats prepared to cut a deal that would reap tens of billions of dollars for other priorities -- including combatting opioids -- while taking their chances on solving the immigration impasse later.

The Senate is slated next week to begin a debate to address the dilemma of immigrants left vulnerable by the looming expiration of former President Barack Obama's Deferred Action for Childhood Arrivals program, or DACA.

Fox News' Chad Pergram and The Associated Press contributed to this report.