President Obama and his political rivals in Washington have jumped into the epic battle in Wisconsin between organized labor and the state’s newly elected Republican governor over the rights and benefits of state workers.

Efforts by Scott Walker, the state’s Republican governor, to slash collective-bargaining rights of public employees prompted days of protests at the state capitol by thousands of union workers, fueled and organized in part by Mr. Obama’s own political apparatus in Washington.

Even as Democratic lawmakers in Wisconsin fled their own state in an attempt to stall a vote in the Republican-controlled state senate, Mr. Obama decried the tactics of Mr. Walker as “an assault on unions.”

That prompted House Speaker John Boehner to rip into Mr. Obama, accusing him of having “unleashed the Democratic National Committee to spread disinformation and confusion in Wisconsin.”

Mr. Boehner, in a statement, praised Mr. Walker and other Republican governors for making the tough decisions to cut spending. And he chided the president for siding with the wrong side in the contentious Wisconsin debate.

“Rather than shouting down those in office who speak honestly about the challenges we face, the president and his advisers should lead. Until they do, they are not focusing on jobs, and they are not listening to the American people who put them in power.”

The sharp-edged retorts from Mr. Obama and Mr. Boehner reflect the broader debate in the nation’s capital as Democrats and Republicans dig in to rigid positions about spending, investment, the deficit and changes to entitlement programs.

In the next two weeks, Democrats and Republicans in Washington are set to play a game of chicken with the federal budget. The government’s authority to spend money runs out on March 4 and could force a shutdown in federal services unless the parties can agree on a new spending plan.

But despite recent calls for bipartisanship and promises to work together in Washington, the standoff in Wisconsin is a preview of how easily discussions could disintegrate into chaos.

For Mr. Boehner, the Wisconsin debate is another opportunity to preach a message of fiscal restraint in the face of demanding unions and government employees. Republican governors in several states, including Wisconsin, have said they must make drastic cuts to deal with huge budget problems.

By jumping quickly to condemn Mr. Obama’s comments, Mr. Boehner explicitly questioned the president’s leadership, suggesting he is unwilling to make the deep sacrifices necessary to put the country on the right fiscal path.

Other Republicans, too, see opportunity in the imagery coming out of Wisconsin. Senator Orrin Hatch of Utah, who is trying to head off a primary challenge from the Tea Party in his state, praised Mr. Walker and other Republican governors for making “tough choices” in their budgets.

“It is too bad that Washington Democrats are attacking them rather than following their lead,” Mr. Hatch said on Thursday. “President Obama’s comments today were, frankly, way off base. The only assault is from a bunch of self-interested government union employees who are putting their interests ahead of the interests of the Wisconsin taxpayers who have been funding their runaway spending.”

He added: “This is not the way public servants should behave.”

Representative Paul Ryan of Wisconsin, the Republican chairman of the budget committee in the House, said on MSNBC’s “Morning Joe” that “It’s like Cairo has moved to Madison these days.”

For Mr. Obama and the Democrats, the Wisconsin debate provides an opportunity to stand by their supporters in organized labor in a part of the country that is likely to be an important battleground during the 2012 presidential election campaign.

It also allows Democrats to once again raise questions about Mr. Boehner’s willingness to see government jobs lost.

This week, Democrats seized on Mr. Boehner’s comment that if government jobs were lost because of the cuts that Republicans are calling for, then “so be it.” Democrats now view the situation in Wisconsin as another example of Mr. Boehner taking sides against workers.

Former Representative David Obey of Wisconsin on Thursday accused Mr. Walker of acting like Hosni Mubarak, the deposed president of Egypt, as protestors marched in the streets of Cairo.

“I think what Gov. Walker is trying to do amounts to political thuggery,” Mr. Obey told Talking Points Memo. “It is one thing to say that these are tough times — everybody’s got to cut back and public employees are going to have to take cuts like the rest of us … but he’s using it as an excuse to gut the ability of workers to organize and bargain collectively. In my view that’s outrageous.”

A spokesman for the Democratic National Committee declined to respond to Mr. Boehner’s accusation of spreading disinformation. But officials confirmed that Organizing for America, an arm of the party, has been “quietly, but significantly, involved in

building grassroots energy and organizing protests.”

The political efforts on behalf of the union workers in Wisconsin were undertaken at the direction of Tim Kaine, the D.N.C. chairman, according to officials at the party.

In addition to helping build crowds for two rallies in Madison this week, O.F.A. organized 15 “rapid-response phone banks” aimed at getting supporters to call state lawmakers. The effort covered 10 cities in Wisconsin, officials said.

Volunteer leaders of O.F.A. helped organize the rallies and youth leaders at college campuses brought buses to help transport people. Another O.F.A. program sought to get letters published in 23 targeted newspapers in Wisconsin. O.F.A. also used blogs, Facebook, Twitter and e-mail messages to rally opposition to Mr. Walker’s efforts.

Mr. Boehner, in his comments Thursday, said Mr. Obama should call a stop to those efforts.

“I urge the president to order the D.N.C. to suspend these tactics,” Mr. Boehner said. “This is not the way you begin an ‘adult conversation’ in America about solutions to the fiscal challenges that are destroying jobs in our country.”