President Trump on Tuesday offered an “olive branch” to Iran as he projected optimism about the future of the Middle East in remarks from Saudi Arabia.

Trump spoke at a U.S.-Saudi investment forum in Riyadh, where he praised leaders in Saudi Arabia, Qatar and the United Arab Emirates for turning their capitals into hubs of commerce and called it his “fervent hope” that Saudi Arabia would eventually normalize relations with Israel.

The president, who has sought to portray himself as a peacemaker for global conflicts, also took a softer tone toward Iran as his administration seeks to reach a deal with Tehran over its nuclear program.

“As I have shown repeatedly, I am willing to end past conflicts and forge new partnerships for a better and more stable world, even if our differences may be very profound, which obviously they are in the case of Iran,” Trump said.

“I want to make a deal with Iran. If I can make a deal with Iran I’ll be very happy,” Trump added. “We’re going to make your region and the world a safer place. But if Iran’s leadership rejects this olive branch and continues to attack their neighbors, then we will have no choice but to inflict massive, maximum pressure.”

Trump said the olive branch to Iran “will not last forever.”

Officials from Iran and the U.S. have been engaged in talks in recent weeks around Tehran’s nuclear program. Trump during his first term withdrew the U.S. from the Obama-era Iran nuclear deal, which had offered sanctions relief in exchange for limits on its nuclear program.

The president has in recent days signaled he could be open to Iran having a civilian nuclear program but has been adamant that Tehran cannot have a nuclear weapon.

Trump also on Tuesday announced he was rolling back sanctions on Syria at the urging of allies in the Middle East in an effort to boost the new government in Damascus.