PESHAWAR, Pakistan — In a boost to U.S.-led forces in Afghanistan, a provincial court on Tuesday ordered that protesters end their blockade of the main NATO supply route through Pakistan.

A two-member bench of the Peshawar High Court declared that protesters’ ad hoc inspections of container trucks traveling into Afghanistan, which frequently barred trucks carrying NATO goods, were illegal and unconstitutional.

Supporters of the Pakistan Tehreek-e-Insaf party, or PTI, the ruling party in Khyber Pakhtunkhwa province, had set up unofficial checkpoints along a highway passing through the provincial capital of Peshawar since Nov. 24 to protest U.S. drone strikes in the country’s tribal areas.

The demonstrators, some wielding clubs, forcibly stopped container trucks on the Pakistani side of the crossing, known as Torkham Gate, and demanded to verify shipping documents, often ordering vehicles loaded with North Atlantic Treaty Organization supplies to turn back.

The blockade was not complete, and some NATO trucks were allowed to pass through. But the U.S.-led coalition was forced to move more supplies through a remote border crossing in Afghanistan’s southern Kandahar province, which wasn’t subject to the blockade, or by air, increasing costs and logistical headaches as forces plan their withdrawal from Afghanistan by the end of 2014.

The federal government in Islamabad signed an agreement with Washington in July allowing the U.S. to use Pakistani land routes for transportation of supplies into and out of Afghanistan until the end of 2015. Congress has threatened to reduce or suspend reimbursements to Pakistan of about $1.65 billion annually if interruption of the supply routes continued.

Justices Yahya Afridi and Malik Manzoor Hussain made their decision in response to a petition filed by a local trader asking the court to declare the protesters’ inspections of container trucks illegal. Traders have complained for months that the demonstrations were destroying business.

After the judges’ decision, PTI’s spokeswoman, Shireen Mazari, said in a statement that leaders would discuss the party's next steps at a meeting Thursday.

The party and its allies, including radical Islamist groups, came to power due in large part to their fierce opposition to CIA drone strikes in the tribal areas, which many Pakistanis regard as a violation of their sovereignty.

The Obama administration significantly curtailed the program after the Pakistani government began a bid to open peace talks with the Pakistani Taliban and allied militants. But the talks appeared to collapse last week when militants reportedly killed 23 Pakistani soldiers in their custody.