(CNN) Former Texas Democratic Rep. Beto O'Rourke offered sweeping criticism of Israeli Prime Minister Benjamin Netanyahu on Sunday, outright calling him "racist" and an obstacle to peace.

Speaking in Iowa as he campaigns for the Democratic nomination for president, O'Rourke said the US-Israeli relationship was among the most important "on the planet" and singled out Netanyahu.

"That relationship, if it is to be successful, must transcend partisanship in the United States, and it must be able to transcend a prime minister who is racist, as he warns about Arabs coming to the polls, who wants to defy any prospect for peace as he threatens to annex the West Bank, and who has sided with a far-right, racist party in order to maintain his hold on power," O'Rourke said.

O'Rourke continued, saying he did not believe Netanyahu "represents the true will of the Israeli people" or the "best interests" of the relationship between the US and Israel. He went on to endorse a two-state solution to achieve peace between Israel and the Palestinians.

"We must be able to transcend his current leadership to make sure that that alliance is strong, that we continue to push for and settle for nothing less than a two-state solution, because that is the best opportunity for peace for the people of Israel and the people of Palestine," O'Rourke said. "It is the best opportunity for the full human rights of everyone who is living in that region."

Read More