An Afghan police officer killed two Americans in Farah province during a training exercise on an Afghan base. (AP)

A member of the Afghan security forces killed two U.S. troops Friday morning — the most recent in a string of insider attacks that threaten to undermine U.S.-Afghan military relations.

An officer in the Afghan Local Police shot and killed two Americans in the western province of Farah during a training exercise on an Afghan base, according to Abdul Rahman, a spokesman for the provincial governor.

U.S. military officials confirmed the two deaths. The assassin was shot and killed, according to a statement.

The attack occurred hours after Taliban leader Mohammad Omar issued a statement boasting of insurgents’ ability to infiltrate the Afghan security forces — a tactic that he said limits the number of civilian casualties.

“Mujaheddin have cleverly infiltrated in the ranks of the enemy according to the plan given to them last year,” he said in the message to the Afghan people marking this weekend’s Eid al-Fitr festival. “They are able to [safely] enter bases, offices and intelligence centers of the enemy. Then, they easily carry out decisive and coordinated attacks.”

Later Friday, an Afghan soldier turned his weapon against foreign troops in Kandahar province in southern Afghanistan, according to military officials. That attack left three NATO troops wounded.

The so-called “insider attacks” have occurred sporadically in Afghanistan for years, but they have risen sharply in the past six months — and particularly in the past 10 days. Eight U.S. service members have been killed by employees of the Afghan security forces since last Thursday. A total of 39 have been killed in such attacks since the beginning of the year.

The top U.S. commander in Afghanistan released a statement Friday deriding Omar’s claims.

“On the eve of the most blessed celebration of Eid ul-Fitr, when the pious people of Afghanistan celebrate their faith and the Holy words of the Koran, once again Mullah Omar has issued an unmistakable message of death, hate and hopelessness for the Afghan people,” Gen. John R. Allen said.

Special correspondent Sayed Salahuddin contributed to this report.