By Richard Cowan and Amanda Becker
WASHINGTON (Reuters) - The U.S. Congress took steps to extend until May 5 the deadline for reaching a deal on federal spending through September and head off a feared government shutdown at midnight on Friday.
Republicans introduced a bill on Wednesday to fund government operations at current levels for one more week, giving them more time to finish negotiations with Democrats on a spending plan for the rest of the fiscal year ending Sept. 30.
The legislation was likely to be voted on by the House of Representatives and Senate on Friday, meaning that if it passes, it would have to be rushed to President Donald Trump to sign into law promptly.
Without this extension or a longer-term funding bill, federal agencies will run out of money by midnight Friday, likely triggering abrupt layoffs of hundreds of thousands of federal government workers until funding resumes.
The last government shutdown, in 2013, lasted for 17 days, and many lawmakers were nervous about the prospect of another.
"I'm confident we will be able to pass a short-term extension" of funding for programs for the fiscal year that began nearly seven months ago, House Speaker Paul Ryan told reporters.
House Democratic leader Nancy Pelosi warned that the purpose of the stopgap measure was to tie up loose ends of a deal to provide around $1 trillion in money for the fiscal year ending Sept. 30 and not for "kicking the can down the road to have this same back-and-forth" over funding disputes.
House Appropriations Committee Chairman Rodney Frelinghuysen expressed optimism in a statement that a final funding package will be completed soon.
In the midst of the delicate negotiations, Trump took to Twitter to blast Democrats.
"As families prepare for summer vacations in our National Parks - Democrats threaten to close them and shut down the government. Terrible!," Trump tweeted, along with a series of other tweets.
Negotiators were racing against the clock to resolve remaining disputes in the massive spending bill amid talks that have already handed Democrats at least two major victories despite Republican control of Congress.
Trump, a Republican, gave in to Democratic demands that the spending bill not include money to start building the wall he wants to erect on the U.S.-Mexico border. His administration also agreed to continue funding for a major component of Obamacare, formally known as the Affordable Care Act, despite vows to end the programme.
It remained unclear whether Republicans would prevail in their effort to significantly increase defence spending without similar increases for other domestic programs. Trump has proposed a $30 billion spending boost for the Pentagon for the rest of this fiscal year.
Such funding disputes could resurface later in spending bills for the next fiscal year starting in October.
Other disagreements must also still be ironed out in the current plan, including funding to make a healthcare programme for coal miners permanent and to plug a gap in Puerto Rico's Medicaid programme, the government health insurance programme for the poor.
Additional "riders" on other issues could also be tucked into the legislation, which must pass both the House and Senate.
Although Republicans control both chambers of Congress, they hold just 52 seats in the Senate and will need support from some Democrats to win the 60 votes needed there to pass the bill.
(Reporting by Richard Cowan and Amanda Becker; Editing by Lisa Von Ahn and Jonathan Oatis)