The six candidates competing in Iran's presidential election have squared off in their third and final televised debate, with President Hassan Rouhani lashing out at his hardline opponents and vowing to get rid of the remaining sanctions following 2015's nuclear deal.

During the fiery event, Rouhani, who is seeking a second four-year term on May 19, said the historic agreement with world powers had ended many sanctions and brought a windfall from renewed oil sales over the past year that could now be invested.

"We want to allocate $15bn for investments ... and $3-5bn for supporting the poor and needy," said Rouhani.

READ MORE: Iran election explainer

But he went further in his closing statement, vowing for the first time to target the remaining US sanctions that are still hampering trade deals and preventing foreign money from entering Iran.

THE TWO SIDES OF IRAN'S POLITICAL SPECTRUM: - The conservative Principlist establishment, which controls most of Iran's economic might through the Islamic Revolutionary Guard Corp's commercial enterprises and the vast financial resources of the religious endowments. Candidates: Ebrahim Raisi, Mohammad Bagher Ghalibaf, Mostafa Mirsalim The Reformist bloc, which prefers political, economic and social liberalisation and an opening up of Iran to foreign investment.

Candidates: Hassan Rouhani, Mostafa Hashemitaba, Eshaq Jahangiri

"I will engage myself in lifting all the non-nuclear sanctions during the coming four years and bring back the grandeur of Iran and the Iranian people," he said.

Rouhani was first elected in a landslide four years ago on a promise to reduce Iran's international isolation.

In 2015, he negotiated the agreement with world powers to curb Iran's nuclear programme in return for lifting sanctions.

He is now trying to hold on to office by firing up reformist voters disillusioned by a stalled economy and the slow pace of social reform.

"If we want a better economy, we should not let groups with security and political backing get involved in the economy," Rouhani said in an swipe at the Revolutionary Guards Corps, an elite military force with a vast business empire, which has backed his main Principlist opponent Ebrahim Raisi.

'Poverty has increased'

The focus of the final debate was on the economy as the candidates, who are all male, outlined their vision for Iran's future.

As in the previous two, bruising debates, the main challengers tore into Rouhani's economic record, arguing that he failed to bring Iranians a better life despite the lifting of sanctions.

"Poverty has increased with this government from 23 percent to 33 percent," said Raisi, a cleric and jurist, who is seen as the leading conservative, though still a distant second to Rouhani in unofficial polls.

"We must increase direct aid to the poor," he added, accusing Rouhani's government of boosting subsidies only at the last minute to grab votes.

"Why did you wait for the election campaign to increase aid? Why didn't you do it four years ago? The people are intelligent and they will decide."

Raisi also kept up his efforts to reach out to poor and religiously conservative voters.

"The people expect government members to fear God," said Raisi, who runs the Imam Reza shrine in the holy city of Mashhad.

Rouhani said: "Mr Raisi, you can slander me as much you wish. As a judge of the clerical court, you can even issue an arrest order. But please don't abuse religion for power."

OPINION: Iran's presidential election puts populism to the test

"During these three televised debates, in the first two rounds, the Principlists actually won and the polls showed that," Mostafa Khoshcheshm, a journalist and university professor at the Fars Media Faculty, told Al Jazeera.

"But in the third one, I believe they [both camps] were equal. They were on the offensive as well as the defensive. They tried to question each other's performance, plans and agendas, but they dealt with their own plans and economic agenda for the country much less," he added.

Khoshcheshm said that Rouhani was expected to have "a difficult job" in the upcoming election.

"The poll show there is going to be a runoff, a second round. and Rouhani may not be able to secure the 50 percent plus one vote that he needs."

Rouhani's deal to lift sanctions won the cautious backing of Supreme Leader Ayatollah Ali Khamenei, but Khamenei and his loyalists criticise its failure to boost the economy.

Benefits have been slow to arrive, in part because of unilateral US sanctions still in place over Iran's missile programme, human rights record and allegations that it supports terrorism.

Rouhani's allies say his rivals oppose deeper change and exposure to international competition in part because of the economic interests of the Guards, which gained control of swaths of Iran's industry during its years of isolation.