California Gov. Arnold Schwarzenegger (R) and the Democratic lawmakers he mocked as "girlie men" earlier this month have reached agreement on a budget that spares the state from higher taxes or deep cuts to social programs but does not solve its long-term fiscal problems.

The political battle over the budget, which is weeks overdue, has been the roughest stretch of Schwarzenegger's eight months in office. It has also pushed California, which is facing a $15 billion deficit, to another financial brink.

On Monday, Controller Steve Westly warned that he would have to withhold several hundred million dollars in state payments due to public schools and community colleges unless the budget won approval by mid-week.

Hours later, after a final round of negotiation, Schwarzenegger and legislative leaders said they had reached a compromise. Lawmakers attending the Democratic National Convention in Boston this week have been summoned back to the state capital. A vote on the budget could take place Wednesday.

When he announced the agreement late Monday night, Schwarzenegger had only praise for the legislature. He called the budget pact the result of "terrific" bipartisanship and said it will put California on a path to recovery. But the state still appears likely to face a deficit that could reach $10 billion next year.

"We are maybe a month late, but it is better to do a budget that is great rather than to rush and do a budget that we regret," he said.

Schwarzenegger established a bipartisan tone in his first months as governor but has shifted tactics this summer. After budget talks collapsed a few weeks ago, he began touring the state and bashing Democratic lawmakers, who control the legislature.

He urged Californians to vote this year to "terminate" legislators resisting his agenda and said the capital was engulfed in political "chaos." He also called lawmakers "girlie men," a reference to an old "Saturday Night Live" parody of his days as a bodybuilder who scorned anyone who was out of shape.

Some lawmakers and women's groups called the taunt juvenile and offensive. Schwarzenegger did not apologize for it -- but he did not repeat it. In recent days, amid signs that voters were losing patience with the budget impasse and the partisan rancor it had sparked, he made new overtures to the legislature.

Senate President Pro Tem John Burton, the state legislature's most powerful Democrat, called the tentative budget agreement flawed but fair. "We all had to agree to things that we do not like," he said.

Asked to describe how the deal was struck, Burton quipped, "When we accepted the fact that we were really girlie men and were just able to get over that."

Schwarzenegger has enjoyed a charmed political life since taking office last November, winning a series of legislative victories, but the budget fight appeared to be taking a toll on his popularity. Campaigning for governor last year, he had promised to deliver a budget on time and without partisan feuding.

A poll conducted this month by the Public Policy Institute of California showed that Schwarzenegger's approval ratings had dropped seven percentage points since the spring, from 64 percent to 57 percent.

"He's certainly still in a very strong position," said Mark Baldassare, the group's research director, "but it appears that people are a little disappointed in the budget process. I think expectations this time were very high that he would get it done on time."

Schwarzenegger has kept his promise not to raise taxes, but he is balancing the state's $103 billion budget with some of the same steps he criticized as a candidate last year, such as borrowing. Some Democratic officials say he is resorting to quick fixes that do not address California's long-term financial health and is gambling that the state's economy will rebound and provide more revenue to cover other new spending pledges.

Budget talks had unraveled over one such promise. To help close the budget shortfall, Schwarzenegger cut a side deal with city and county governments to divert nearly $3 billion in state aid for localities this year and next in exchange for future bans on such raids. But many lawmakers objected, calling the promise too risky. Schwarzenegger eventually agreed to a compromise that limits but does not prevent the legislature from using money earmarked for local governments to stave off a budget crisis.

To reach a budget deal, he also had to persuade GOP lawmakers to make concessions. Some vowed to vote against the budget unless the legislature repealed laws that allow workers to sue employers for even minor labor violations and that require school districts to pay bus drivers union-scale wages. The agreement does not include those demands.

But GOP leaders said Schwarzenegger has much to be proud of in his first budget. "He drove us together," said state Assemblyman Kevin McCarthy (R-Bakersfield). "He made it happen."

Schwarzenegger called the budget responsible and said he is satisfied with the compromises he had to make with Democrats.

"I said many times even when I was lifting weights sometimes I was shooting for a 500-pound lift and sometimes I ended up with 495," he told reporters on Monday night, "but I still was happy with it."

Gov. Arnold Schwarzenegger said the budget pact will help California recover. But the state could still face a $10 billion deficit.