“Instead of reaching across the aisle to find support for increased funding for public education,” said Richard W. Hurd, a professor of labor studies at Cornell, “they are reaching across the aisle for people who are not sold on the idea that charter schools are good, or that testing should be used for all teacher evaluations, or that teachers should lose job security.”

Such cross-party alliances have attracted the scrutiny of advocacy groups that unions have criticized for pouring money into the campaigns of candidates who support easing limits on charter schools and abolishing teacher seniority rules. Students First, the group run by Michelle A. Rhee, the former schools chancellor in Washington, provided The New York Times with a list of candidates who had received campaign donations from teachers’ unions, which The Times has independently verified.

Students First has contributed nearly $640,000 to Republicans in this election cycle, including money to some candidates who hold right-wing views on issues like abortion and same-sex marriage. The group, one of several that have contributed to candidates who support their education agenda, has also donated almost $1.4 million to Democrats.

Tim Melton, legislative director of Students First, pointed out that many of the state candidates they support are members of the American Legislative Exchange Council, an organization that the American Federation of Teachers and the National Education Association have condemned for its education agenda, which includes vouchers, charter schools and test-based evaluations.

“I’m greatly surprised that they would attack us ferociously for something they are doing themselves,” Mr. Melton said.

Union officials say they are just being practical. “It doesn’t do a whole lot of good to shut out the Republicans who at least have the potential to be friends of the public schools,” said Clay Robison, a spokesman for the Texas State Teachers Association.