MOSCOW — A plan to build a regional natural gas pipeline across war-ravaged southern Afghanistan, long thought to be impractical given the dismal security there, moved a step closer to becoming a reality on Saturday.

The leaders of Turkmenistan, Pakistan and Afghanistan and India’s energy minister signed a preliminary agreement in Turkmenistan’s capital, Ashgabat, to proceed with plans for the American-backed pipeline, the Russian news agency Itar-Tass and other regional media reported.

United States officials hope that the line, called TAPI, will not only bolster Afghanistan’s economy by generating transit fees but will strengthen ties between the archrivals India and Pakistan.

The pipeline, which would be about 1,080 miles long, would carry gas from Turkmenistan through Afghanistan and Pakistan and into India.

The agreement signed on Saturday, however, is just an early step in the pipeline project. The government backers of the plan have yet to secure financing for construction or to agree on commercial terms for the sales, according to news reports from Russia and Central Asia. The project’s cost estimates range from $3 billion to $10 billion.

The agreement also does not address how the pipeline would be protected in Afghanistan’s Helmand and Kandahar Provinces, which have been Taliban strongholds. The Afghan government has said the pipeline would be buried and local communities would be paid to protect it.

India and Pakistan now import energy, while Turkmenistan has the world’s fourth-largest reserves of natural gas. Users of the trans-Afghan pipeline would pay fees to the countries that it passes through, with Afghanistan being the largest beneficiary.

Under the terms of the pact, Afghanistan could also benefit by withdrawing some of the gas as cheap fuel for electrical stations and heating.

The project, as with so many other energy infrastructure works in the region, is deeply entwined with politics. The United States is backing the line as an alternative to the proposed Iran-Pakistan-India, or IPI, pipeline that would tap Iran’s large South Pars gas field.

The United States deputy assistant secretary of state for Central Asia, Susan Elliott, told an energy conference in Turkmenistan last month that the TAPI pipe “would provide revenue and jobs for Afghanistan at a critical time in its economic development,” while helping to stabilize the wider region.

Oil companies proposed the pipeline in 1995, but it dropped off their agenda after the Taliban took control of Afghanistan the following year. The plan was revived after the United States-led invasion of Afghanistan in 2001, and received backing from the Asian Development Bank, which financed feasibility studies.