Ebrahim Raisi, a hardline cleric close to the Supreme Leader Ayatollah Ali Khamenei, was elected Iran's president in June 2021.
The 60-year-old, who takes office on 5 August, presented himself as the best person to combat corruption and solve the economic problems Iran has experienced under the outgoing President, Hassan Rouhani.
He was previously head of the country's judiciary, and has ultra-conservative political views. Many Iranians and human rights activists have pointed to his alleged role in the mass executions of political prisoners in the 1980s.
Ebrahim Raisi was born in 1960 in Mashhad, Iran's second biggest city and home to the country's holiest Shia Muslim shrine. His father, who was a cleric, died when he was five years old.
Mr Raisi, who wears a black turban identifying him in Shia tradition as a descendant of the Prophet Muhammad, followed his father's footsteps and started attending a seminary in the holy city of Qom at the age of 15.
While a student he took part in protests against the Western-backed Shah, who was eventually toppled in 1979 in an Islamic Revolution led by Ayatollah Ruhollah Khomeini.
After the revolution he joined the judiciary and served as a prosecutor in several cities while being trained by Ayatollah Khamenei, who became Iran's president in 1981.
Mr Raisi became the deputy prosecutor in Tehran when he was only 25.
While in that position he served as one of four judges who sat on secret tribunals set up in 1988 that came to be known as the "Death Committee".
The tribunals "re-tried" thousands of prisoners already serving jail sentences for their political activities. Most were members of the leftist opposition group Mujahedin-e Khalq (MEK), also known as the People's Mujahedin Organisation of Iran (PMOI).
The exact number of those who were sentenced to death by the tribunals is not known, but human rights groups have said about 5,000 men and women were executed and buried in unmarked mass graves in what constituted a crime against humanity.
Leaders of the Islamic Republic do not deny that the executions happened, but they do not discuss details and the legality of the individual cases.
Mr Raisi has repeatedly denied his role in the death sentences. But he has also said they were justified because of a fatwa, or religious ruling, by former supreme leader Ayatollah Khomeini.
Five years ago an audio tape of a 1988 meeting between Mr Raisi, several other members of the judiciary and then Deputy Supreme Leader Ayatollah Hossein Ali Montazeri (1922-2009) was leaked. In it, Montazeri is heard describing the executions as "the biggest crime in the history of the Islamic Republic". A year later Montazeri lost his position as Khomeini's designated successor and Ayatollah Khamenei became the Supreme Leader upon Khomeini's death.
Mr Raisi went on to serve as Tehran's prosecutor, then head of the State Inspectorate Organisation and first deputy head of the judiciary, before being appointed prosecutor general of Iran in 2014.
Two years later, Ayatollah Khamenei named him custodian of one of Iran's most important and wealthiest religious foundations, the Astan-e Quds-e Razavi.
It manages the shrine of the eighth Shia Imam Reza in Mashhad as well as all various charities and organisations affiliated with it. According to the US, it has vast economic holdings in construction, agriculture, energy, telecommunications and financial services.
In 2017, Mr Raisi surprised observers by standing for the presidency.
Mr Rouhani, a fellow cleric, won a second term by a landslide in the election's first round, receiving 57% of the vote. Mr Raisi, who presented himself as an anti-corruption fighter but was accused by the president of doing little to tackle graft as deputy judiciary chief, came second with 38%.
The loss did not tarnish Mr Raisi's image and in 2019 Ayatollah Khamenei named him to the powerful position of head of the judiciary.
The following week, he was also elected as deputy chairman of the Assembly of Experts, the 88-member clerical body responsible for electing the next Supreme Leader.
As judiciary chief, Mr Raisi implemented reforms that led to a reduction in the number of people sentenced to death and executed for drug-related offences in the country. However, Iran continued to put more people to death than any other country apart from China.
The judiciary also continued to work with the security services to crack down on dissent and to prosecute many Iranians with dual nationality or foreign permanent residency on spying charges.
Then-US President Donald Trump imposed sanctions on Mr Raisi over his human rights record in 2019. He was accused of having administrative oversight over the execution of individuals who were juveniles at the time of their alleged crimes, and of being involved in the violent crackdown on the protests by the opposition Green Movement after the disputed presidential election in 2009.
When Mr Raisi announced his candidacy for the 2021 presidential election, he declared that he had "come as an independent to the stage to make changes in the executive management of the country and to fight poverty, corruption, humiliation and discrimination".
The election was subsequently overshadowed when the hard-line Guardian Council disqualified several prominent moderate and reformist candidates. Dissidents and some reformists urged voters to boycott the poll, complaining that the process had been engineered to ensure Mr Raisi faced no serious competition.
He went on to secure a crushing victory, winning 62% of the vote in the first round. However, turnout was just under 49% - a record low for a presidential election since the 1979 revolution.
Little is known about Mr Raisi's private life except that his wife, Jamileh, teaches at Shahid Beheshti University in Tehran, and that they have two adult daughters. His father-in-law is Ayatollah Ahmad Alamolhoda, the hardline Friday prayer leader in Mashhad.