The outcome is as expected, a solid victory with 18 out of 28 million votes or so for the hardline winner, Ebrahim Raisi, who is currently head of the Supreme Court. He was previously Attorney General, ran four years ago for president, and has a long history of being a public prosecutor going back into his 20s (he is now 60). In 1988 he played a role in the killing of about 5,000 prisoners, which led him to be sanctioned from traveling in the US. He has regularly ordered executions, gaining a reputation as a "hanging judge," although I think they mostly use the electric chair there. While has run against corruption, there are reports that he is involved in some, and this will probably be used against selected political opponents. He was clearly the favorite of the supreme leader, Vilayet-al-faqih (numerous transliterations of that title), often translated as "Supreme Jurisprudent," Ali Khamenei, age 82, who is Commander-in-Chief of the military as well as the top person of the police and judiciary, over Raisi in the court system. Many see this a Raisi being positioned to succeed Khamenei in that position.
Turnout was unusually low at less than 50 percent, with many voters boycotting the election. It is clear that Khamenei and the hardliners did not want any "surprise" moderate winners as has happened in the past, arguably 8 years ago with outgoing President Hassan Rouhani. In 2013 Iran was suffering severe economic sanctions that President Obama organized, with Russia and China largely joining in, which had the goal of bringing Iran to the nuclear negotiating table. Rouhani ran on doing that and went after he got elected. This led to the 2015 Joint Comprehensive Plan of Action (JCPOA) nuclear agreement where Iran shut down some reactors and reduced its uranium enrichment to less than 3.75 percent. Most of the economic sanctions were lifted, although the US retained some that had been on previously due to human rights issues, and the Iranian economy turned around and had positive growth again. This led to Rouhani being reelected four years ago, even though then President Trump was talking about leaving the agreement, which all agreed Iran was keeping to. But he had not done so at that point. He did withdraw the following year, imposing even stronger sanctions and demanding European and other firms follow suit as well, although no other signatory to agreement supported Trump's decision. But the sanctions hit, and the Iranian economy turned around and has been in a steep fall since with solid double digit unemployment and inflation rates. Oil exports are now about one tenth of what they were before.
Trump's SecState, Pompeo, whose arrival in office coincided with the move to leave the JCPOA, made 12 diplomatic demands on Iran and declared that either Iran would agree to some of these and return to the negotiating table or the regime would fall. None of that happened, although the Iranian economy has suffered greatly with much suffering for the Iranian people. Unsurprisingly this outcome completely discredited Rouhani and his allies, with their hardline enemies, some of whom had said the US cannot be trusted to make an agreement with, looking good and riding high. Thank you, President Trump for this total failure on your part, possibly the worst foreign policy move of the whole administration.
Even though the moderates were seriously discredited, Khamenei was not taking any chances. For candidates to run for office in Iranian elections they must be approved as being "sufficiently Islamic" by the Council of Guardians, a 12-person body half of them appointed by Khamenei and the other half by the judiciary, with now-President-Elect Raisi having selected three of them. The body ruled out the two most serious moderate candidates in the mold of Rouhani, one of them his vice president, Eshaq Jahangiri, and the other, and apparently more substantial candidate, Ali Larijani, a former Speaker of the Majlis (parliament) who was the lead negotiator of the JCPOA nuclear deal.
This left as the most substantial moderate candidate, much more conservative than either of those two, the head of the central bank, Abdolnasr Hammeti, who urged people not to boycott. But in the end he came in third, with the second place winner, Mohsen Rezaei, a former Revolutionary Guard commander and hardliner, getting about three million votes. Some of have noted that Raisi versus Hammeti was sort of like having Chief Justic John Roberts run against Fed Chair Jerome Powell in the US.
While this will almost certainly lead to some crackdowns on mild liberalizations in the treatment of women in Iran, it is unclear what many of Raisi's policies will be. Given his solid frontrunner status he was reportedly quite vague about his plans during debates that happened (there were 7 allowed candidates in all). He seems to have a pretty free hand, within limits.
One area that may not turn out too badly has to do with the ongoing renegotiation of the JCPOA agreement, which Biden ran on reentering. Those negotiations have reportedly made some progress, but had become stalled, with many essentially seeing the Iranian side as waiting for this election to do anything serious. The big complication is that both sides ended up violating the agreement, so there is a timing issue of who undoes which violation before the other in order to get the agreement back in place. Iran actually continued to obey the agreement for a year after the US withdrew, hoping the Europeans might either not go along with obeying the US sanctions or even convincing Trump to rejoin it. But after this did not happen, they began to violate it in several ways, including now enriching uranium up to a 60 percent level (90 percent is weapons grade level).
In any case, supposedly Raisi supports the negotiations, and in any case any return to the agreement will require the support of Khamenei, who presumably will be more supportive of something Raisi might come to. What is clearly not going to happen is that any of the additions to the agreement some in the US (and some other well-known outsiders) have been demanding be made, most notably to add restrictions on the Iranian ballistic missile programs. That is not going to happen, and now Putin has agreed to help then with a satellite program that will support that. The best that can be hoped for is some sort of return to the old agreement, so stupidly trashed by Trump, but even that is not a slam dunk at all.
Addendum a few hours later: I have just read Juan Cole's analysis of the election. Mostly agrees with mine. He makes a couple of extra important points. One is that there is a six weeks transition while Rouhani is still president. He thinks Khamenei wants Rouhani to make the deal with the US on renewing the JCPOA during this period so that if things do not work out, Rouhani can be made the scapegoat, although he definitely wants a deal and the sanctions lifted.
The other point is that one reason he wants Raisi in, aside from perhaps grooming him as likely successor, is that he wants to resist opening the economy and society to outside influences. Marina and I have long described Iran as the premier example of a New Traditional economy, one trying to combine a traditional cultural system (Shia Islam) with a modern economy. But this involves a serious tension between being open to new technologies and all that and preserving that cultural dominance the ulama have there in Iran.
He also commented on local foreign policy implications, but these seem fairly few. Raisi visited Iraq in February and supported the pro-Iran parties there. Would like US totally out, but this is not new. Seems to have worked on improving relations with neighboring Iraq, who is clearly very important economically for Iran. He supports Assad in Syria, and has said little about Yemen, although the Houthis welcomed his election.