With time running out, an ideological fight in the Congress over abortion and environmental issues threatened on Thursday to derail an agreement to avert a government shutdown.

The mood swung between optimism and pessimism as Democratic and Republican leaders held a whirlwind series of private meetings and public news conferences through the day to plead their case for a budget deal that would keep the government operating beyond midnight on Friday.

Senate Majority Leader Harry Reid, a Democrat, and House of Representatives Speaker John Boehner, a Republican, met for more than an hour with President Barack Obama and will return to the White House at 7 p.m. EDT.

I'm not very optimistic, Reid told reporters before the evening meeting, blaming the impasse on a Republican push for policy provisions that would block public funding of birth control and stymie environmental protection efforts.

House Republicans approved a stop-gap bill to push the deadline back a week that includes $12 billion in additional spending cuts and assures Pentagon funding through September 30.

Reid called the short-term extension a non-starter in the Senate because of the spending cuts. Obama vowed to veto it.

I did express to the president my disappointment that he suggested he would veto that, Boehner told reporters after the afternoon White House meeting. We can get to an agreement, but we are not there yet.

Congressional negotiators resumed talks in the afternoon to try to hammer out a deal on billions of dollars in spending cuts that would keep more than 800,000 government workers in their jobs when federal funding expires at midnight Friday.

TEA PARTY

Reid said fiscal conservatives aligned with the Tea Party movement were driving the process by pushing an extreme agenda and cheering for a shutdown.

Boehner is under pressure to stand firm in the talks from Tea Party conservatives who helped fuel last year's big Republican elections gains with promises of deep spending cuts and reduced government.

If this government shuts down, and it looks like it's headed in that direction, it's going to be based on our friends in the House of Representatives, the leadership over there, focusing on ideological matters, Reid said.

With the U.S. economy in the early stages of a recovery from the worst recession since the 1930s, the administration warned a shutdown could hit small business owners, applicants for home loans and workers who would be left without paychecks as the result of federal layoffs.

The investment firm Goldman Sachs estimated a government shutdown lasting more than a week could cost the economy $8 billion in missed federal spending, dragging down growth.