The agreement, signed late on Sunday, also won enthusiastic support from the United States which hopes it will bring the two closer to fight militants operating on both sides of the border and help counter the Taleban-led insurgency in Afghanistan.

"(President Hamid) Karzai ... congratulated people of both countries on the signing of the agreement and called it a major step for the regional trade and for the path of its development," his office said in a statement following the signing of the pact late on Sunday.

Afghanistan has long demanded its trucks be allowed to transport goods to India through Pakistan via the sensitive Wagah land route. It also gives it access to the sea, an Afghan official said. Pakistan has fought several wars with India and remains deeply suspicious of its larger neighbor. Critics accuse Islamabad of treating Afghanistan as "strategic depth" in case of further conflict.

A US embassy statement called the transit deal one of the most important achievements between the two countries in nearly 50 years and their most significant bilateral economic treaty.

It needs to be ratified by both parliaments.

More exports would help Karzai counter a Taleban insurgency by improving economic conditions, an important goal for Washington as it looks ahead to President Barack Obama's July 2011 target date to begin withdrawing US troops.

Almost 50 percent of Afghanistan's trade is with its five neighbors — Pakistan, Iran, Tajikistan, Turkmenistan and Uzbekistan. Trade between Afghanistan and Pakistan is worth more than $1 billion annually.

The deal comes ahead of an international conference in Kabul on Tuesday at which donor countries and Karzai's government will try to chart a path forward for the conflict-torn country. Afghanistan hopes its strategic geographic position will make it a regional transit hub for trade with Central Asia, South Asia, the Middle East and China, if the country becomes stable.

US officials say the new deal will reduce average transit costs between the two countries by half, lower import costs and make exports more competitive, along with helping employment prospects on both sides of the border.