Senator Bernie Sanders pledged to be friendly toward both Israelis and Palestinians, if elected president, and condemned the continued building of settlements in the West Bank in a speech in Utah Monday.

The Vermont senator, who packed rally stadiums with tens of thousands of supporters in Washington State over the weekend, skipped out on a major pro-Israel conference on Capital Hill to campaign in the West ahead of three primary contests on Tuesday and more to come this Saturday.

Before a major rally in Salt Lake City this afternoon, Sanders delivered a speech on foreign policy outlining his Middle East agenda to a smaller crowd of high school students and teachers in Salt Lake City.

In his speech, Sanders highlighted his ties to Israel, having spent time at a Kibbutz as a young man, but advocated the right to self determination for both Israel and Palestine under a proposed two-state solution.

"We are obligated to speak the truth as we see it and that is what real friendship demands," Sanders said. "If elected president, I will work tirelessly to advance the work of peace as a partner and friend to Israel, but to be successful we have to be friendly not only to Israel but to the Palestinian people."

"Peace will mean an end to what amounts to the occupation of Palestinian territory, establishing mutually agreed upon borders, and pulling back settlements in the West Bank, just as Israel did in Gaza," Sanders added.

The senator also called for an end to the blockade of Gaza and decried Israeli Prime Minister Benjamin Netanyahu's proposal to expand settlements in response to the most recent violence. But he also condemned attacks on Israel and "indiscriminate rocket fire by Hamas into Israeli territory" and use of much needed money for infrastructure to build underground network of tunnels.

The Vermont senator also reaffirmed his support for the Obama administration's nuclear Iran deal, despite misgivings among advocates for Israel. Although he said that the deal does not represent everything he would want, if the accord is "successfully implemented" it could prevent Iran from acquiring a nuclear weapon and that is the top priority.

In the context of Israeli security, the senator said he did not agree with Israeli Prime Minister Benjamin Netanyahu's opposition to the deal, saying "his is hardly a consensus opinion in Israel."

"I do not accept the idea that the 'pro-Israel' position was to oppose the deal," he said. "Preventing Iran from getting a nuclear weapon will strengthen not only America's security, but Israel's security as well. And I am not alone in that idea."

Sanders also zoomed out to other conflicts in the Middle East writ large, reaffirming his position that regime change and use of force should be the last option. He touched on threats by the Islamic State and reiterated previous statements that the effort against the militant group must be led by Muslim partners on the ground. He also advocated the creation of a political framework to mitigate unstable governance in Iraq and Syria, but did not go into detail.

Sanders said his remarks Monday were largely what he would have delivered at the conference held by the powerful American Israel Public Affairs Committee, a notorious Washington, DC, lobby group.

Sanders is the only presidential candidate to skip AIPAC this year, as more than 18,000 pro-Israel advocates and lobbyists have descended on Washington for the event. Sanders, who has attempted to maintain a neutral stance on Israel, proposed to present a video speech, but organizers refused the offer.

The conference is attended annual by top Jewish leader from around the globe as well as presidential candidates who use it as an opportunity to make the case for their ability to hold up on the international state, and wade into issues in the Middle East and position themselves as allies to Israel on matters of security.

Not long before Sanders spoke in Utah, Clinton delivered a scathing attack on Republican frontrunner Donald Trump at AIPAC, casting the billionaire businessman as unqualified to fill the role of commander in chief.

Despite his quarter decade in Congress, Sanders is still seen as lacking on the foreign policy front, especially compared with Clinton, a former Secretary of State with a large rolodex of foreign policy advisers at her fingertips.

In debates and townhalls, Sanders has been repeatedly criticized for discarding chances to speak on foreign policy in favor of returning to his main policy line of economic inequality. At many forums, Sanders's main talking point on the issue has been his vote against the Iraq War.

Foreign policy experts are divided on Sanders's expertise in the area. In an op-ed for Politico last month, Lawrence Korb, who has worked at numerous think tanks and was as an assistant secretary of defense in the Reagan administration, declared that Sanders "certainly isn't a foreign policy lightweight."

But others have critiqued his lack of emphasis on the subject. "He absolutely needs to know a lot more than he knows now and to be aware of the major options he will likely have," Michael E. O'Hanlon, research director for foreign policy at the Brookings Institution, told VICE News earlier this year. "January 20, 2017 is way too late to begin the freshman course."

Sanders and Clinton have already move into the next phase of campaigning in mostly western states thought to be more favorable to Sanders. On Tuesday the candidates will compete in Hawaii, Alaska, and Washington.

The campaign scored a minor victory on Monday, wining the Democrats Abroad primary, which counted ballots from 34,570 US citizens living abroad in 38 different countries. Sanders received nine of 13 delegates up for grabs.

"The second half of the primary starts now, and it's one where we hold a considerable number of advantages," Sanders campaign manager Jeff Weaver wrote in a recent email to supporters. "If we can keep winning states and delegates, we're going to come back and win this primary."