KANDAHAR, Afghanistan (AP) — In the dusty badlands along its disputed border with Afghanistan, Pakistan is carving out a massive trench to keep out separatists, smugglers and militants in an attempt to bring order to a lawless, tribal region.

But like the Berlin Wall or Israel’s West Bank barrier, the planned 485-kilometer (300-mile) trench is giving physical form to a border that locals have long seen as artificial, dividing families and crippling trade. And it is adding to simmering tensions between Afghanistan and Pakistan, U.S. allies which have long accused each other of turning a blind eye to insurgents.

The trench runs along part of the 2,640-kilometer (2,640-mile) Durand Line, named for British diplomat Mortimer Durand, who drew the now internationally recognized border in an agreement with Afghan ruler Abdur Raham Khan in 1893. But the modern Afghan government has never accepted the border, and neither have the mainly tribal communities that straddle it. They are accustomed to moving back and forth freely and in some cases own land on both sides.

The trench is being built in Pakistan’s Baluchistan province, where Baluch rebels have been battling Islamabad for decades, demanding greater autonomy and a larger share of the region’s oil, gas, copper and gold. It’s an eye-sore of construction — a massive furrow 10 feet (three meters) wide and 8 feet (2.4 meters) deep that already snakes 180 kilometers (110 miles) across the desert landscape.

Pakistan’s Frontier Corps said in a recent statement that the trench would “not only help in effectively controlling the movement of drug and arms and ammunition smugglers, but also will help in stopping the intrusion of terrorists and illegal immigrants.” Pakistan fears that arms could make their way to any number of insurgent groups, including the Taliban.

But Kabul sees the trench as the latest move in a new incarnation of the colonial-era Great Game, in which Pakistan hopes to destabilize its neighbor to extend its regional influence. It already considers Pakistan as the source of the Taliban insurgency it has been battling with U.S. and NATO support for the past 13 years.

“The people here have never accepted the Pakistan-Afghanistan border in the first place,” said Gen. Abdul Raziq, the police chief of Afghanistan’s Kandahar province, which borders Baluchistan.

“Pakistan is not doing anything to stop terrorism. If they want to stop it, they should stop producing it,” said Raziq, who has long had a reputation for ruthlessness in battling the Taliban. “This trench is simply to draw a border with Afghanistan and claim our land as their own,” he said.

Pakistan insists it is committed to fighting extremist groups and points to a massive offensive it launched in the tribal region of North Waziristan along the Afghan border over the summer. But analysts have long said Islamabad differentiates between the Pakistani Taliban, with which it is at war, and the Afghan Taliban, which it quietly tolerates and views as a means of preserving its influence in Kabul.

In that context, the trench is not seen by Afghans as a counterterrorism measure, but as an affront.

“This can never be acceptable for the Afghans,” said former Afghan Tribal and Border Affairs Minister Akram Akhbelwak, who was removed from his post this week while President Ashraf Ghani finalizes his new Cabinet.

“The trench and the tribal border are completely illegal. Such actions on the border are creating problems among the tribes and will never be a solution to the problems between the two countries,” he said.

Afghanistan’s Ghani signed security agreements with Washington and NATO immediately after taking office in September, permitting an enduring international military presence after the combat mission formally ends on Dec. 31. The insurgents have meanwhile stepped up their war against his government with a series of high-profile attacks in Kabul.

Along the border, construction is proceeding, to the anger of local residents.

“My land is my only asset from my forefathers — now some of it is on the other side and I’m powerless to do anything about it,” said tribal elder Muhammad Ghaffar, who like many people living along the trench took the freedom of movement across the Durand Line for granted.

Raziq said that when work began, some local people made their anger clear and there was some exchange of fire across the line. “But then we got orders from Kabul not to engage with Pakistani forces, so we backed off,” he said.

For polio worker Abdullah Jaanan, the implications of the barrier are potentially devastating, as Pakistan is experiencing a resurgence of the disease and his area of responsibility traverses the trench. Jaanan said that eradication of the disease, which remains endemic only in Pakistan, Afghanistan and Nigeria, is taken seriously by Afghans.

“But how can I go and visit those homes on the other side of trench?” he said.

___

Associated Press writers Amir Shah in Kabul and Abdul Sattar in Quetta, Pakistan contributed to this report.

___

Follow Lynne O’Donnell on Twitter at www.twitter.com/lynnekodonnell .