ISLAMABAD (AP) — Afghan and Pakistani authorities blamed each other Wednesday for an overnight clash at the border that caused casualties on both sides.

Taliban in a statement Wednesday said that Afghan authorities tried to stop Pakistani forces form building a check point close to the border in eastern Paktia province’s Dand-e Patan district, but the Pakistani forces opened fire.

Pakistan’s military said in a statement that three soldiers were killed in the country’s northwest by militant fire from across the Afghan border Tuesday night. The attack hit a border security post in Kurram, a district in the Khyber Pakhtunkhwa province.

Bilal Karimi, deputy spokesman for the Taliban’s government said that by understanding, no military installations can be built near the border between Afghanistan and Pakistan.

But Pakistani forces tried to build a post. Some people approached them to talk and discuss the matter, when suddenly the Pakistani forces opened fire, said Karimi.

“The issue is under investigation and (Taliban) leaders have been informed,” Karimi said.

Both Pakistan and Afghanistan accuse each other of providing sanctuaries to their enemy insurgents — something both sides deny.