For most of his first term, President Obama has managed to have it both ways on education reform.

He has received steady, if not effusive, support from politically potent teachers unions while promoting an agenda that is hugely unpopular with many educators, including evaluations that hold them accountable for student test scores.

But a strike by 26,000 public school teachers in Chicago that began Monday threatens to place Obama at odds with a critical segment of his political base in the final weeks of a campaign in which he has little margin for error. At the center of the dispute is his famously blunt former chief of staff, Chicago Mayor Rahm Emanuel (D), who is pushing aggressively for policies the president has championed: higher academic standards, longer school days and greater teacher accountability.

Obama has much to lose, and administration officials are working behind the scenes to end the conflict, which appeared headed into its third day. If Emanuel, who is closely associated with the president, is seen as knuckling under to union demands, critics could depict Obama as in thrall to public-sector employees who locked 350,000 children out of school.

Should Emanuel be perceived as the victor, the president could lose valuable ground with the most powerful forces in organized labor.

“It’s hard to extricate the White House from what’s happening in Chicago right now,” said Joe Williams, executive director of Democrats for Education Reform, a political group that has aired ads in support of Obama’s agenda and, most recently, run radio spots in Chicago to pressure the union to go along with Emanuel’s policies.

The American Federation of Teachers — the national parent organization of striking Chicago instructors — and the National Education Association boast a combined membership of 4.5 million. Democratic candidates up and down the ballot depend on teachers to hold rallies, staff phone banks and canvass neighborhoods in get-out-the-vote efforts that often make the difference in close races.

“In terms of putting resources up and boots on the ground, those unions are important,” said Steve Rosenthal, a longtime union organizer who is active in Democratic politics. “If they’re distracted, it’s not helpful. If there’s lingering anger and animosity, it’s not helpful.”

Rosenthal added that labor leaders could expect Obama to speak up on behalf of the teachers.

“It’s a high-visibility strike, and there are expectations that Democrats will stand with striking workers,” he said.

Publicly, the administration has taken a hands-off approach to the dispute, in which the most contentious issue is a city proposal to raise from 25 percent to 40 percent the portion of a teacher’s evaluation that is based on students’ improved test scores.

“I hope that the parties will come together to settle this quickly and get our kids back in the classroom,” Education Secretary Arne Duncan said in a statement Tuesday afternoon. “I’m confident that both sides have the best interests of the students at heart, and that they can collaborate at the bargaining table — as teachers and school districts have done all over the country — to reach a solution that puts kids first.”

Privately, administration officials are following the events closely and pushing hard for a speedy resolution. Duncan, a former chief executive of the Chicago school system, has been in frequent phone contact with American Federation of Teachers President Randi Weingarten, according to a senior administration official who spoke on the condition of anonymity to be candid. And AFT officials reached out to Obama’s reelection campaign Sunday to keep the president’s team abreast as it became clear that the strike would happen, according to people familiar with the call.

There are signs that the administration is seeking to frame the strike as less of a showdown over education reform than a blood feud between Emanuel and Karen Lewis, the equally unrelenting president of the teachers union.

Last week, at a packed Labor Day rally at Daley Plaza, Lewis called Emanuel a “liar and a bully.”

“A lot of this is personal,” the administration official said. “A lot of this is Rahm. The teachers feel disrespected. No one wants this to go on. The longer it goes on, it hurts everyone — Karen, Rahm, everyone.”

But labor is pushing back at the notion that this is merely a local conflict. Wisconsin labor activists, who lost their fight with Republican Gov. Scott Walker this year over legislation that severely restricts collective bargaining by public-sector unions, are preparing to rally on Friday in Madison to support striking teachers.

“This is not a Chicago issue,” Kerry Motoviloff, president of Madison Teachers Inc., said on the union’s Web site. “This is not a Wisconsin issue. This is not even limited to a union issue. This is a worker issue. Scott Walker, Rahm Emanuel, they cannot define us.”

“This is an epic battle,” said Nathan Saunders, president of the Washington Teachers Union, who flew to Chicago on Tuesday to show support for the strikers.

Members of the National Education Association, the nation’s largest labor union, passed a 13-point resolution in 2011 stating that it was “appalled” by Duncan’s reform ideas. The resolution condemned his embrace of charter schools and the use of competitive grant programs such as Obama’s “Race to the Top” as an alternative to spreading federal education money evenly across the country.

But NEA President Dennis Van Roekel has said repeatedly that whatever differences the 3-million-member union has with the Obama administration, it would be worse off under Mitt Romney. The Republican presidential nominee supports vouchers that would allow parents to use tax money to enroll students in private or parochial schools, a program that teachers unions oppose.

Van Roekel, whose Washington office is decorated with posters and T-shirts that say “Educators for Obama,” has a monthly breakfast meeting with Duncan and access to the administration that his predecessor never had under George W. Bush.

“We’ve got more people actively involved [in campaigning for Obama] at this point than we did in 2008,” he said. “What’s happening in Chicago is not part of the presidential campaign. It’s way too serious and complicated.”

In New Hampshire, Scott McGilvray, state NEA president, said his members were so consumed with a gubernatorial primary race Tuesday that they weren’t paying close attention to the Chicago strike. The teachers union in New Hampshire has been collaborating on education reforms with state officials, and although McGilvray said teachers haven’t embraced every policy change the Obama has administration promoted, he predicted they will turn out in larger numbers than in 2008 to help the president win their swing state in November.

“You’re either in one camp or the other,” McGilvray said, referring to the choice between Obama and Romney. He added: “If you look at where Mitt Romney stands with vouchers and unions, he’s more of a threat than [John] McCain was. He was a neighboring governor who refused to meet with labor at all. Never let them into his office.”