NEW DELHI -  Indian Prime Minister Narendra Modi and Iranian President Hassan Rouhani agreed on Saturday to step up efforts to bring stability to war-ravaged Afghanistan.

Modi reiterated India's commitment to help Afghanistan become "a peaceful, secure, permanent, prosperous and pluralistic country" after holding talks with Rouhani in New Delhi on the last day of his three-day visit.

"Looking at our common interests, we are committed to stopping the expansion of such forces that promote international organised crime in terrorism, extremism, illegal drug trafficking, cyber crime and various forms," Modi said. "We want to see our region and the world free from terrorism."

There was no mention of financial assistance or providing weapons to help Afghanistan fight militants by either leader. They did not name Pakistan but it has long been accused of supporting insurgents in Afghanistan.

India has been a key supporter of Kabul's government and has poured more than $2 billion into the country since the Taliban were toppled in 2001.

In 2016, India offered $1 billion in economic aid to strengthen various sectors in the war-torn nation including education, health and agriculture.

Rouhani said Iran and India "are prepared for joint ventures in gas and petroleum sectors." He sought India's investment in these areas, as well as in the industrial and mining sectors.

He said Afghanistan must be "a vivacious and secure country," adding that Iran and India would also cooperate in dealing with the situations in Iraq, Syria and Yemen. Iran is a key stakeholder in the future of those nations.

Rouhani's visit to India came at a time when President Donald Trump has threatened to scuttle an international deal reached with Iran in 2015 over its nuclear programme that ended economic sanctions imposed on the country.

The uncertainty puts India in a difficult position with its growing ties with the United States.

Rouhani referred to Trump's threat on the nuclear deal, and said that "politics without adhering to one's commitment and promises cannot resolve the conflicts and problems of the current world."

He also accused the United States of intervening in the internal affairs of countries in the Middle East. "Why did they (US) invade Iraq? Why are they in Syria now? Why have they occupied a part of Syria now?" Rouhani asked while giving a speech at the Observer Research Foundation, an Indian think-tank.

"We know that selling arms is a very profitable business," he said. "We are aware that the factories that produce arms need customers."

Modi said both countries wanted to increase economic cooperation, regional connectivity and improve energy security to reach landlocked Afghanistan and central Asia via the southern Iranian port of Chabahar.

The port, which was inaugurated in December, has been touted as a way for India to establish trade routes that bypass its rival Pakistan.

India has been a key purchaser of Iranian oil and gas, and maintained trade ties even as international sanctions were imposed on Tehran over its nuclear programme between 2012 and 2016.

However, local Indian media have reported frustrations over delays in awarding a contract to develop a major gas field known as Farzad B in the Gulf. India's foreign ministry said Saturday that "discussions continue" on Farzad B.

The two leaders also signed agreements for avoidance of double taxation and the implementation of an extradition treaty from 2008.

As part of a lease contract, India will help Iran run a multi-purpose container terminal at Chabahar for 18 months.

India, Iran and Afghanistan signed a three-way transit agreement in 2016 to develop Chabahar port aiming to boost economic growth in the region.