LONDON — Two days after saying he intended to step down, Iran’s foreign minister, Mohammad Javad Zarif, returned to his post after President Hassan Rouhani rejected the resignation.

There were smiles all around on Wednesday, as Mr. Zarif appeared alongside Mr. Rouhani during a welcoming ceremony for a visiting dignitary broadcast live on state television.

Despite his return, the major reason for Mr. Zarif’s resignation — his diminished status in the government — is not likely to change significantly, analysts said.

Mr. Zarif, urbane, worldly and fluent in English, has for years been Iran’s public face to much of the world, and never more so than when he brokered a landmark deal with world powers curtailing Iran’s nuclear program.