Two hedge fund executives are opening their checkbooks to try to bail out embattled Senate Republicans and pro-charter school Democrats in state Senate elections.

Titans Daniel Loeb and Paul Singer have donated $1 million each to the pro-charter group New Yorkers for a Balanced Albany, which in the past has funded campaigns to preserve GOP control of the Senate.

Loeb, founder and CEO of Third Point investments, was until recently chairman of the board of the Success Academy charter school network.

He has not been shy about mixing it up with politicians who do not support parental and student choice to attend charter schools, which are publicly funded but privately managed alternatives to traditional public schools.

Loeb ignited a firestorm last year when he cast state Sen. Andrea Stewart-Cousins (D-Westchester) as a political tool of the teacher’s union.

Singer, founder of the Elliott Management Hedge fund, has also been a donor to the Success Academy, the city’s largest charter school network.

The 63-member state Senate is nearly equally divided. There are 32 Democrats and 31 Republicans.

But the Republicans maintain a wafer-thin majority because conservative Democrat Simcha Felder caucuses with them.

Aside from supporting Republicans, the pro-charter Balanced Albany PAC has also backed former members of the renegade Senate Independent Conference who were allied with the GOP.

The ex-IDC members, who reunited with the regular Democratic conference, face primaries from opponents who are less friendly to charters, which are mostly staffed by non-union teachers.

Earlier this spring, the billionaire heirs to the Walmart fortune — Alice and Jim Walton — also donated $1 million to the pro-charter Balanced Albany PAC.

Pro-union advocates who oppose charter schools slammed the $2 million in combined donations provided by Loeb and Singer.

Jonathan Westin, executive director of New York Communities for Change, said it was “long past time” for the wealthy hedge funders to stop their outsize contributions.

New Yorkers for a Balanced Albany had no immediate comment.