Supporters cheered and opponents threw shoes and eggs at his convoy as he returned from New York, where he addressed the United Nations General Assembly, the BBC reported.
Before leaving New York, Rouhani spoke by telephone to U.S. President Barack Obama, the first such conversation in 30 years. The Fars news agency quoted Rouhani as saying Obama initiated the call, which was contrary to earlier reports.
Rouhani described the call as "mostly focused on the nuclear issue."
In a series of pieced-together Twitter messages, Rouhani provided details of the conversation, NBC News reported.
"I express my respect for you and ppl of Iran," Rouhani said Obama told him. "I'm convinced that relations between Iran and U.S. will greatly affect region. If we can make progress on nuclear file, other issues such as Syria will certainly be positively affected. In regards to nuclear issue, with political will, there is a way to rapidly solve the matter."
Rouhani said Obama concluded, "Thank you. Khodahafez."
"Khodahafez" is a Farsi expression for "May God protect you."
The tweets were later deleted, but not before they were preserved in retweets.
A Rouhani aide who witnessed the telephone conversation between the presidents was "giddy" when he described it later, The New York Times reported.
The Iranian leader has said he wants to resolve the controversy over Iran's nuclear program in three to six months.
Notable deaths of 2014 [PHOTOS]
Syrian Al Qaida group executes Lebanese soldier