By Parisa Hafezi

ANKARA, Aug 3 (Reuters) - Hassan Rouhani won the endorsement of Iran's supreme leader for his second term of president on Thursday after an easy election win, pledging to open Iran to foreign trade and investment but facing internal hardline resistance and renewed U.S. antagonism.

Under Rouhani's watch, Iran emerged from international isolation in 2015 when it struck a deal with six world powers to curb its disputed nuclear programme in exchange for the lifting of financial and economic sanctions in place for a decade.

But his quest to parlay fragile detente with the West into financial infusions to rebuild Iran's oil-based economy has been slowed by investors' fears of pre-existing U.S. sanctions and suspicions among powerful hardline acolytes of Supreme Leader Ayatollah Ali Khamenei of any rise in Western influence.

The new U.S. sanctions could embolden Rouhani's conservative rivals who say the nuclear deal was a form of capitulation.

An elite insider who has held senior political and military posts since the 1979 Islamic Revolution, Rouhani comes off as a pragmatist unlike Khamenei and his allies, and analysts have cast doubt on his ability to balance their demands and the expectations of his often young and more liberal supporters.

Khamenei, who has the last word on all major issues of state, formally endorsed Rouhani as president in a ceremony broadcast live on state television on Thursday, after the pragmatist romped to re-election on May 19.

Addressing religious, military and political leaders, Khamenei prayed for "the success of a worthy person".

Handing the presidential mandate to Rouhani, Khamenei kissed him on the cheek and the president kissed the Supreme Leader on his shoulder, a sign of supplication.

Khamenei again called for economic self-sufficiency and a "resistance economy", a stance arising from his repeated criticism of the halting pace of economic recovery since most international sanctions on Iran were lifted early last year.

Rouhani will be sworn in on Saturday and then have two weeks to present his cabinet to parliament for a vote of confidence.



AIMS TO IMPROVE IRAN'S IMAGE ABROAD

"The government's aim is to improve Iran's image in the world ..., to safeguard people's rights..., to end poverty..., to protect the religious democracy and our people's votes," Rouhani said in a speech at the ceremony.

Analysts said Rouhani may struggle to make a significant impact given sharpening divisions in the dual clerical-republican power structure, and Washington's return to an aggressive Iran policy since Donald Trump took office.

"Hardliners will try even harder than in Rouhani's first term to make him look like a lame duck president ... It will be very difficult for Rouhani to deliver on the economy," said Meir Javdanfar, an Iranian-born expert on the Islamic Republic at the Interdisciplinary Center Herzliya in Israel.

Rouhani's own supporters have expressed concern over his inability to include women as ministers in his new cabinet because of pressure from religious hardliners. Javdanfar said the new U.S. sanctions on Iran signed by Trump into law on Wednesday, along with measures against Russia and North Korea would likely deter foreign investors and so undermine Rouhani's efforts to boost the economy.

Rouhani stuck to an upbeat outlook in his speech. "The nuclear deal is a sign of Iran's goodwill on the international stage...Iran will never be isolated," he said.

During his 2016 election campaign, Trump blasted the nuclear agreement - negotiated under his predecessor Barack Obama - as "the worst deal ever" but not followed through on threats to pull the United States out of it.

But Iran's deputy foreign minister said the fresh sanctions violated provisions of the nuclear deal and vowed an "appropriate and proportional" response.

"Imposing new sanctions on Iran by America is a reactionary, illegitimate and irrational move," state television quoted Foreign Ministry spokesman Bahram Qassemi as saying on Thursday.

(Reporting by Parisa Hafezi; Editing by Mark Heinrich) ((parisa.hafezi@thomsonreuters.com; +90 532 176 3452; Reuters Messaging: parisa.hafezi@thomsonreuters.com))