The Senate has advanced a short-term deal to fund the federal government and prevent a partial shutdown at midnight on Friday.
The measure still needs approval from the House and President Donald Trump but senators voted 81 to 14 for an interim spending bill that would keep the government funded through Dec. 18.
The measure was put together after congressional leaders and the White House failed to reach a longer-term agreement on funding.
The bill will now go to the House, where it almost certainly will be approved. The White House has indicated that President Trump will sign the measure if it is passed by Congress.
With the extension, Congress will have another three weeks to negotiate a long-term agreement on government funding. But if a longer-term deal cannot be reached, Congress will have to approve another short-term bill to keep the government open.