Among Mr. Obama’s critics was Governor Walker. “The president ultimately should stay focused on fixing the federal budget because they’ve got a huge deficit and, believe me, they got their hands full,” Mr. Walker said on “Fox News Sunday.” He also said “more and more” protesters were coming from other states.

At issue in Madison is less Mr. Walker’s proposed reduction in public employees’ pay and benefits, which the unions have agreed to, and more his proposal to limit their collective bargaining rights. But people familiar with the protests say the national Democratic Party got engaged days after the demonstrations began and mostly after union officials, liberals and Wisconsin Democrats complained that the Obama organization was missing in action.

Mr. Obama has had strained relations with unions in general, and many do not believe he fights hard enough for their issues; public employee unions have been especially critical lately, since he proposed a two-year freeze of federal employees’ pay.

The Milwaukee television interview that was Mr. Obama’s first involvement in the Madison budget war was sought by the White House not to interject the president into the state’s fight but to promote his separate message concerning his own national budget-cutting drama: the station broadcasts into the district of the Republican chairman of the House Budget Committee, Representative Paul D. Ryan.

In the interview, the president sought to thread the needle between supporting the need for public employees to sacrifice while defending their bargaining rights: “Some of what I’ve heard coming out of Wisconsin, where they’re just making it harder for public employees to collectively bargain generally, seems like more of an assault on unions.”

That comment was “inappropriate,” Senator Lindsey Graham, Republican of South Carolina, said on the NBC program “Meet the Press” on Sunday.

“The governor of Wisconsin is doing what he campaigned on,” Mr. Graham added.

Senator Richard J. Durbin, Democrat of Illinois, disagreed. “I believe the president should have weighed in,” he said on the same program. “I think we should all weigh in and say, ‘Do the right thing for Wisconsin’s budget but do not destroy decades of work to establish the rights of workers to speak for themselves.’ ”