New York Attorney General Eric Schneiderman says if the "unconstitutional" Republican bill to repeal and replace Obamacare is signed into law, he will sue.

In a statement Thursday, after the House narrowly passed the legislation, Schneiderman warned that it would be a threat to the "health and wellbeing" of New Yorkers.

"In addition to the devastating impact this bill would have on every New Yorker's access to affordable healthcare, the legislation that passed the House today is unconstitutional in several critical respects — and I stand ready to challenge it in court," he said.

Schneiderman took particular issue with the bill's "attempt to effectively deny" womens' access to reproductive health services and how it "exceeds Congress's authority" by interfering with how New York has elected to fund its Medicaid program.

"This bill threatens to slash essential healthcare services for millions of New Yorkers who need them the most," Schneiderman said. "For these reasons, if this disastrous and unconstitutional healthcare bill is ultimately signed into law, I will challenge it in court."

Republican leaders in the Senate say they will not vote on the House version of the bill, but rather will write their own legislation, incorporating elements of it.