The moderate conservative cleric Hassan Rouhani won just over 50% of the vote in Iran's presidential election, avoiding the need for a run-off.
Thousands of Iranians took to the streets of Tehran and other cities when the result was announced, shouting pro-reform slogans.
Here, people in Iran discuss what the future may hold under the new president.
Mahdi, 29, software developer, Mashhad, Sunday
Everyone was out in the streets last night showing their appreciation with the election result. People were very happy. Even those who didn't vote celebrated because Rouhani is the least bad of them all.
I am still suspicious because I know they are capable of anything. They lost our trust four years ago during the previous election.
I think the only reason Ayatollah Khamenei approved Rouhani is because they know that otherwise there would be big protests and this time they might not be able to maintain control.
I didn't vote. I am against the Islamic Republic and I didn't want to help them in this election. They are all puppets of the supreme leader who doesn't want a free Iran.
I am not a supporter of Rouhani or his policies. He is a cleric, he'll do whatever the supreme leader wants him to do.
I would like Iran to become a free country, with freedom of expression and better economy. With open boundaries, free trade and less Islamic engagement in government.
Rouhani won't change things dramatically, he will probably only make things slightly better.
Ruholla, engineering student, 26, Tehran, Sunday
I voted for Mr Rouhani. Not only did he get my vote, but I also convinced my family and friends, who didn't want to vote because of what happened during the last election, to vote for him also.
I am really happy he won.
Last night we went out to celebrate with friends. The city was full of people and it was really good to see happiness on people's faces.
Hope has come back to the people.
I am very optimistic. I didn't think they'd cheat again like during the previous election. They'd completely lose the trust of the people. So I wasn't surprised with the result.
I hope there will be real change. I am not just hoping, I am sure there will be. Of course we want Iran to become a free, more democratic country. That won't happen immediately, but step by step.
Power has been given to the people and I am confident everything will get better.
I have not voted and I will never vote. However, I am glad that Dr Rouhani won because he is not as close to the Supreme Leader Ayatollah Khamenei as other candidates are.
I was actually quite surprised that Ayatollah Khamenei let this happen.
I hope there will be changes in our relations with other countries.
We need to come out of isolation and start interacting with Western powers in order to remove the embargoes and restore Iranian people's honour in the world.
Akbar, estage agent, 60s, Tehran, Saturday
Yes I did vote although I didn't think it would change anything, but incredibly this is a very open election.
They are saying Hassan Rouhani has more than 50% of the vote which means he will win in the first round.
Nobody believed that would ever happen, we assumed a hardliner would be made the president.
I am surprised and overjoyed there is jubilation here.
We were in a real state before with the sanctions and the inflation. The economy was a mess with rising poverty and there was no economic reform. It was becoming utterly impossible to do business here.
This is evidence Iran is changing and is coming to grips with reality.
We must negotiate on the international side, this will have huge repercussions for our politics, with our role in Syria - we need to address should we be involved in that war at all, with our nuclear programme too.
I have lived in Iran for the past 35 years, for the duration of the current regime and I have a son who is also in business and a daughter who works in shipping dealing with transactions. The sanctions have hit imports in particular and the average Iranian income has gone down by a third because of exports.
Change is long overdue.
Ali, medical student, 20, Isfahan, Saturday
We are very angry about the government's actions, which have made every day life very hard for us. The price of everything has become three times as much in the last year. A lot of young people have been put in prison too for criticising the government.
Yesterday some people wrote on a wall near my house, 'Down with Khamenei'. One hour later the government people came and erased it. Living in Iran is to live under constant tension.
I don't accept the government. Voting is accepting the government because all of the candidates are approved by the government. They are not chosen by the people, so there is no real choice.
That is why I did not vote. None of my family voted. Our neighbours didn't vote either.
Masoud, science researcher, 28, Isfahan, Saturday
The first thing I hope he will do is change Iran's nuclear policy. Iranians don't want a nuclear bomb. Not at any cost like Pakistan. They have a nuclear bomb but they can't support themselves, they can't keep the electricity running, they have no jobs. We don't want to be like them.
Rouhani will change international policy and I hope he can lift the sanctions. It's been really tough for ordinary people.
Other governments think they can control our government with sanctions but it doesn't work, it just leaves us in even harder economic situation, but it won't stop the government.
Foreign countries should take a fresh view of Persians. We will ask them to change their policy towards us because we selected a reformist to interact with other countries to solve this problem.
I was accepted for Phd study in America but our poor economy and the increase in the dollar meant that I wouldn't be able to support myself financially over there, so I can't go.
Ahmadinejad ruined the economy. Mr Rouhani says he will support agriculture so farmers can produce more food, I hope he will support industry.
Ahmadinejad was only interested in the nuclear industry. During his rule many newspapers were forced to close in Iran.
You couldn't say anything against the government. They didn't allow people at university to be critical of the government. This has to change.
I have two sisters. One of my sisters didn't vote because she didn't believe it would change, but my other sister voted for Rouhani.
She is very stylish with her hair and make-up and wanted to sew clothes in a factory but she couldn't get a job because of the poor economy but also because she is a woman.
She voted for Rouhani to get more freedom for women. I voted for him to remove the sanctions and improve the economy so that I can study abroad.
Interviews by Sitala Peek and Krassimira Twigg