US President Barack Obama said that Iran has the potential to become a “very successful regional power” if Tehran agrees to a comprehensive deal restricting its controversial nuclear program, in a year-end interview with National Public Radio.

Obama said that the ongoing nuclear talks with Iran are an opportunity for the Islamic Republic to “get right with the world.” NPR posted a transcript of the interview on its website Monday.

While US Vice President Joe Biden said earlier this month that there was “less than an even shot,” at reaching a deal with Iran, Obama told NPR that he was optimistic about reaching a long-term deal with Tehran. He said a comprehensive nuclear agreement limiting Iran’s nuclear program would allow it to be “reintegrated into the international community.”

When asked if there was a possibility of reopening a US embassy in Tehran in his final two years in office, Obama said he would “never say never,” but that diplomatic ties had to be restored gradually.

The US severed diplomatic ties with Iran after pro-revolution activists seized the US Embassy in Tehran in 1979, taking 52 American citizens hostage for 444 days.

Obama noted the differences between Iran and Cuba, where the US plans to open an embassy. He said Cuba was small and posed no major threat to the US, while Iran was large, hafd sponsored terrorism and had sought nuclear capabilities.

The president told NPR that Iran should take advantage of the opportunity to lift the international sanctions that have crippled its economy for almost 20 years — “because if they do, there’s incredible talent and resources and sophistication inside of Iran and it would be a very successful regional power that was also abiding by international norms and international rules – and that would be good for everybody,” he said.

Referring to the bloody war with Iraq in the 1980s, Obama said he recognized Iran’s “legitimate defense concerns” but criticized the Islamic republic’s “adventurism, the support of organizations like Hezbollah, [and] the threats they have directed against Israel.”

Under an interim nuclear agreement reached between Iran and P5+1 nations that went into effect in early 2014, Tehran agreed to temporarily freeze portions of its nuclear program in exchange for eased economic sanctions as the countries work toward long-term agreement. The interim deal was the first formal agreement between the US and Tehran in 34 years.

Iran and the P5+1 nations — UN Security Council permanent members Britain, China, France, Russia and the United States plus Germany — failed to strike a deal in November 2014, and extended the deadline to reach a full accord until July 2015.

Last week, Iran’s Foreign Minister Mohammad Javad Zarif said he was confident that Iran and the P5+1 powers would reach an agreement, but cautioned that the West should not impose unrealistic demands in curbing Iran’s nuclear program.

AP contributed to this report.