Julian Castro said Monday it would be his "first move" as president to condition aid to Israel on preventing annexation of Palestinian-held land as desired by Israeli prime Minister Benjamin Netanyahu.

"What I believe, what I hope, is that as Israel forms a new government, we're going to have a new opportunity to work with our ally to ensure there is no unilateral annexation, (and) that we pursue a two-state solution," the former Housing and Urban Development secretary and Democratic presidential candidate told a conference of J Street, a liberal pro-Israel group, which cheered his remarks.

The Photos You Should See – Oct. 2019 View All 84 Images

"My hope is that we can work like crazy so we don't get to that point," Castro said. "I would not take it off the table. I want to focus on what we can do hopefully with a new government, and a new president" in 2021, he added.

Ahead of September elections, Netanyahu vowed to extend annexation of portions of the West Bank if he were re-elected, a pledge directed at Israel's right wing. The elections failed to produce a clear winner, and Netanyahu and political rival Benny Gantz have been in negotiations on a unity government. Should that effort fail, Israel could have an unprecedented third parliamentary election in a single year.

J Street calls itself "pro-Israel and pro-peace," and supports a two-state solution to the conflict with the Palestinians. It is highly critical of both Netanyahu and one of the Israeli leader's biggest supporters, President Donald Trump.

Castro also said he would put a U.S. consulate in east Jerusalem, an area Israel annexed during the 1967 war, adding that that consulate would serve as an embassy after a two-state solution was achieved.

The United States also needs to "reassess" its relationship with Saudi Arabia, in whose embassy journalist Jamal Khashoggi was murdered more than a year ago. "Our values should be bigger drivers of these relationships," Castro said. Sometimes there are urgent security interests or economic interests that come into play, but "somewhere along the way we've come to rely too much on those interests," the former Obama administration cabinet member said.

Like other Democratic contenders, Castro slammed Trump's withdrawal of troops from northern Syria, saying the U.S. is "abandoning our allies (and) causing others to doubt our loyalty."

America should be reducing its Middle East footprint, he said, but "you have to be as thoughtful coming out as you are going in. What we see in Syria is a lack of thoughtfulness coming out."