TEHRAN, Iran — Iran’s moderate President Hassan Rouhani trounced a hard-line challenger to secure re-election Saturday, saying his country seeks peace and friendship as it pursues a “path of coexistence and interaction with the world.”

Friday’s election was widely seen as a referendum on the 68-year-old cleric’s push for greater freedom at home and outreach to the wider world, which culminated in the completion of a landmark 2015 nuclear deal that hard-liners initially opposed.

The nuclear deal won Iran relief from international sanctions in exchange for limits on its contested nuclear program.

But Iran continues to suffer from high unemployment and a dearth of foreign investment, putting pressure on Rouhani to show he can do more to turn the sluggish economy around.