Several former ministers and hardliner former president Mahmoud Ahmadinejad are among those who have registered.
The five-day registration for the presidential election opened on April 11. Ghalibaf was Rouhani's main contestant in 2013 election and received some 6 million votes.
"Rouhani was elected primarily on the promise of elevating the economic position of Iranians", Ellie Geranmayeh, a senior policy fellow for the Middle East and North Africa program at the European Council for Foreign Relations, said before the president registered his candidacy.
"We have repeatedly declared that strengthening the defensive prowess of Iran's Armed Forces is only aimed at defending the country and will never be used against another country", Rouhani said in a ceremony in Tehran on Saturday to unveil new domestically-manufactured defense achievements.
The 55-year-old conservative mayor had given mixed signals about whether he would make a third bid for the presidency, but showed up at the interior ministry just before the deadline for registration.
Democracy and democratic elections are attainable by reference to the people's vote and respect to the law, he told reporters.
He pointed to several crises in the Middle East and across the world and said, "In our region, we have witnessed different crimes and acts of aggression by regional countries and sometimes by big powers and the U.S.".
Russian Federation backs out of Eurovision after Ukraine banned its singer
The contest organisers also condemned the Ukrainian decision but said the event will go ahead. This will be the first time it has not taken part in the competition.
The situation, however, was brought into focus by the reports that the Supreme Leader - who had been in his post since 1989, after serving as President - was now terminally ill.
Ahmadinejad previously served two four-year terms from 2005 to 2013. He said he would run as an "independent" and described himself as a "soldier" of Iran.
The AP also highlighted three specific areas of interest regarding Ahmadinejad's candidacy, namely Iran's internal politics, the anxieties of its neighbors and rivals, and the prospects for continuing enforcement of the controversial nuclear agreement between Iran and six world powers. He also registered on Friday.
Mr Raisi is a judge and a cleric who is close to Ayatollah Khamenei, and was born into a religious family.
But, crucially, Rouhani retains the unified support of moderates and reformists, who still see him as the best hope for change within the strict parameters of Iran s Islamic system.
The presidential candidates can enroll for presidential elections on April 11-16.
Following the registration, Rouhani hailed the Iranian worldwide nuclear deal, known as JCPOA, as his administration's achievement, saying that "from now on, protecting the nuclear deal would be one of the important issues (for the next government) politically and economically".