Daniel Loeb has been a prolific donor not just to Gov. Andrew Cuomo over the years, but has backed a variety of Republican candidates running in battleground state Senate races as well as a GOP-aligned super PAC.

Loeb’s donations in since 2014 have totaled well over $4 million, including millions donated to New Yorkers For Balanced Albany, an independent expenditure committee that has supported Republican candidates.

Loeb has also given $50,000 to the Senate Independence Campaign Committee, which supports the Independent Democratic Conference in the chamber.

His donations are under scrutiny now as he faces criticism for writing in a since-deleted Facebook post that Senate Minority Leader Andrea Stewart-Cousins has done more to harm people of color than anyone who has worn a hood — an allusion to the Ku Klux Klan. Loeb in a statement apologized.

The comments have been repudiated by a Cuomo spokesman as well as IDC Leader Jeff Klein.

Assembly Speaker Carl Heasite on Twitter called Loeb’s comments “offensive and wrong.”

“This is backward thinking which has no place in today’s world,” he said.

Loeb has been a prominent benefactor of charter schools, a politically contentious issue for Albany and state lawmakers. His donations have shown a keen interest in who controls the state Senate, backing the eight-member IDC, a key bloc of lawmakers who have been allied with Republicans.

Loeb, too, has sought to aid GOP candidates running in hotly contested Senate races. Over the last three years, he’s given $226,600 to the Senate Repulican Campaign Committee. Senate Majority Leader John Flanagan received $11,000 from Loeb in 2015 as have fellow Long Island Republican Sens. Kemp Hannon and Elaine Phillips.

Since 2014, Cuomo’s campaign has received $85,000 in donations from Loeb.

Senate Republicans have generally been supportive of expanding and strengthening charter schools in New York state with measures opposed by the state’s teachers unions.

Cuomo, too, has embraced charter schools over the years, though after several contentious fights with the Assembly he has de-emphasized so far this year.