ALBANY – The state’s politically potent teachers union has elected its first female president, with convention delegates over the weekend ousting their longtime leader.

Karen E. Magee, an elementary school teacher from the Harrison School District in Westchester County, replaces Richard C. Iannuzzi, a former Long Island teacher, as president of the New York State United Teachers.

The union has 600,000 members statewide, including Buffalo and most suburban districts in the region.

“Our team stands for change and our work begins now,” Magee said in a statement issued by NYSUT. Iannuzzi has been president of NYSUT since 2005.

With money and a political operation sought after by many politicians from both the Democratic and Republican parties, NYSUT has been a hefty force in Albany for years.

Like most public employee unions, relations between NYSUT and Gov. Andrew M. Cuomo, though, have been chilly at best.

In the recent state budget talks, Cuomo repeatedly refused NYSUT’s requests to delay implementation of a teacher-evaluation program at the same time he and lawmakers had agreed to delay components of the Common Core curriculum and testing program.

After the budget was adopted Monday, though, Cuomo signaled he wants to do something about the teacher-evaluation system before the Legislature ends its session in June; he has not elaborated.

In advance of the weekend’s elections, in which Iannuzzi for months had been battling internal problems in his union, various sources in Albany were predicting that Cuomo would try to work with the new NYSUT president on the teacher-evaluation issue, in part, as an olive branch to the new union leader. Cuomo is up for re-election this year.

Magee, who has been president of the Harrison Association of Teachers, will serve for three years.

Among those re-elected was Andrew Pallotta as executive vice president; he had been part of the Iannuzzi team but broke away last year.

Philip Rumore, president of the Buffalo Teachers Federation, said the local union’s governing body voted to back the ouster of Iannuzzi.

“We felt there was a lack of strong leadership and assertiveness,” Rumore said, accusing NYSUT of mishandling calls by union members for the resignation of state Education Commissioner John B. King Jr. and not pushing back enough on problems with Common Core.

Rumore said the new leadership team will stand up more to Cuomo, the Board of Regents and King, and has already devised ways to form partnerships with parents groups across the state.

Rumore said both Iannuzzi and Cuomo came away from the weekend meeting in Manhattan as losers among delegates.

“I think I can speak for all the delegates there. They are very angry and disappointed with the governor. … They clearly feel he’s not been their friend, but rather an enemy,” Rumore said of Cuomo’s positions regarding the ways to turn around failing schools and the boosting of charter schools.