Pakistan's prime minister has said that an "assassination attempt" on Friday targeted his country's top diplomat in Afghanistan, amid tensions between the neighboring countries.

"I strongly condemn dastardly assassination attempt on Pakistan Head of Mission, Kabul," Shahbaz Sharif said in a tweet.

Sharif added that the attackers failed to harm the Pakistani diplomat, but shot and wounded his security guard.

Pakistan's foreign ministry said in a statement that the security guard was "critically injured in the attack while protecting the Head of Mission". The statement did not clarify exactly where the shooting took place, but said "the compound of the Embassy of Pakistan in Kabul came under attack".

AFGHAN SOLDIER WHO FLED TALIBAN RULE TO GET TO THE US ARRESTED AT TEXAS BORDER

The shooting comes a day after Pakistan's government demanded Afghanistan’s Taliban rulers prevent terrorist attacks coming from their soil. Pakistani Taliban, who are allied with their namesake's across the border, claimed responsibility for a suicide bombing earlier in the week in southwestern Pakistan that sent a wave of shock and anger across the nation.

The bombing killed four people and appeared to target police protecting polio workers in the area.

Pakistan blames the Afghan Taliban for not doing enough to control militants sheltering in their country who stage attacks across the border. The Taliban seized power last year in Kabul as the last U.S. and NATO troops withdrew from Afghanistan.

Taliban fighter

Taliban fighters near the site of an attack in Kabul, Afghanistan, on Dec. 2, 2022. A prominent politician and warlord, Gulbuddin Hekmatyar, also escaped unhurt in a separate attack in Kabul on Friday, his office said in a statement. The two attackers were killed by security guards. (AP Photo/Sidiqullah Khan)

Afghan foreign ministry spokesman, Abdul Qahar Balkhi, strongly condemned the attack on the Pakistan embassy in Kabul, and said that the Taliban will not allow any "malicious actors to pose a threat to the security of diplomatic missions in Kabul".

"Our security will conduct a serious investigation, identify perpetrators and bring them to justice," added Balkhi.

'ATTITUDE SHIFT': HOW COVERT TEAMS OF FEMALE US AND AFGHAN SOLDIERS OPENED THE DOOR FOR WOMEN IN COMBAT

A prominent politician and warlord, Gulbuddin Hekmatyar, also escaped unhurt a separate attack in Kabul on Friday, his office said in a statement. Security guards killed the two attackers as they tried to enter a mosque where Hekmatyar and his supporters had gathered for Friday prayers, the statement said.

Hekmatyar later said in a video message that the attackers were suicide bombers disguised in women's burqas who intended to blow him up.

No one immediately claimed responsibility for either of the attacks in Kabul.

Hekmatyar, who battled U.S. forces after the 2001 invasion and nursed a bitter rivalry with other Afghan factions, agreed to lay down arms in 2017 and join a peace deal with former President Ashraf Ghani.

CLICK HERE TO GET THE FOX NEWS APP

Hekmatyar stayed in Kabul after the Taliban took power in last year, even as Ghani and other former leaders fled.

The former warlord battled the Soviets in the 1980s and then took part in the civil war that erupted after their withdrawal, clashing with the so-called Northern Alliance, before the Taliban first seized power in the late 1990s.