Former Texas representative and 2020 Democratic presidential candidate Beto O’Rourke said on Wednesday that U.S. President Donald Trump has turned the U.S.-Israel relationship into a partisan issue.

“Certainly the president is trying to [turn Israel into a partisan issue]; I don’t think he’ll be successful in that,” he told Haartez at the LGBTQ synagogue Beit Simchat Torah in Manhattan. “Certainly Prime Minister [Benjamin] Netanyahu has tried to do that [with] the lack of respect that he showed to President [Barack] Obama, the partisan politics in which he’s participated here in the United States.”

“But we don’t have to accept that, and I don’t,” he added.

O’Rourke, who in April called Netanyahu “racist” in response to a campaign pledge to annex parts of Judea and Samaria if he were to win re-election that month, said that “I would do everything I could to work with Prime Minister Netanyahu if he is in power and if I am lucky enough to serve as president, and to support the U.S.-Israel relationship.”

However, he continued, “that is not mutually exclusive to ensuring that the right of self-determination for the Palestinian people is not compromised or undermined or ended all together, functionally and for all practical purposes, as an annexation would do.”

Additionally, O’Rourke reiterated his support for a two-state solution to the Israeli-Palestinian conflict.

“It is the only way that I think you achieve those goals of human dignity and security, self-determination and the safety that people should be able to depend on in their day-to-day lives,” he said.

O’Rourke is one of 10 candidates who will be in the next Democratic presidential primary debate on Sept. 12.