Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

PESHAWAR, Pakistan — Winning hearts and minds it is not.

U.S. forces in Afghanistan on Wednesday apologized for dropping “highly offensive” leaflets that showed a passage from the Quran superimposed onto the image of a dog.

"Are the PR advisers fighting or feeding the enemies?"

Dogs are considered unclean by many Muslims, and the Afghan Taliban later said it carried out a suicide attack on U.S. forces in Bagram Airfield in apparent revenge.

The attack just outside the main gate of Bagram injured four people. No U.S. forces were killed or injured, Abdul Shukor Qudos, Bagram district chief, told NBC News.

Taliban spokesman Zabihullah Mujahid said the Taliban was behind the attack, but the group provided no proof that it had directed it. He added that the Taliban would continue attacks on U.S. forces.

Earlier, the military had warned in a statement that they were expecting demonstrations as a result of the misstep.

“The design of the leaflets mistakenly contained an image highly offensive to both Muslims and the religion of Islam,” Maj. Gen. James Linder, who leads the American and NATO special operations forces in Afghanistan, said in a statement. “I sincerely apologize. We have the deepest respect for Islam and our Muslim partners worldwide.”

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Related: U.S. Has Many More Troops in Afghanistan Than Pentagon Admits

The pamphlets dropped in Parwan province on Tuesday showed a lion chasing a white dog with the Taliban flag emblazoned on it. The militant group's flag contains a fundamental declaration of faith repeated five times a day by devout Muslims throughout the world: “I testify that there is only one God and Muhammad is his messenger.”

Above the picture, the leaflet urged people to report insurgents.

“Take back your freedom from the terrorist dogs and cooperate with coalition forces so they can target your enemy and eliminate them,” it said, according to Reuters.

U.S. soldiers patrol a highway in Afghanistan's Parwan province. Cpl. George Huley / U.S. Army handout

The move quickly triggered criticism.

"Are the PR advisers fighting or feeding the enemies?" prominent Afghan journalist Bilal Sarwary wrote on Twitter.

A Taliban commander who spoke to NBC News on condition of anonymity called the move "stupid."

"They did by themselves what we had been trying to make the Afghan people and other Muslims understand for past 16 years — that the primary purpose of the U.S.-led foreign occupation forces is to fight against Islam and Sharia," he said, referring to Islamic law.

Later Wednesday, the Taliban carried out a suicide bombing at Bagram airbase near Kabul, stating that they were seeking "revenge" for the leaflets. Abdul Shukor Qudos, a local official, told NBC News the attack had injured four people. No U.S. personnel were hurt, he added.

The "small number of casualties" were being treated at the base's medical facilities, according to U.S. military officials.

Past perceived offenses against Islam have provoked deadly violence.

In 2012, the Americans apologized after copies of the Quran burned at Bagram Air Base near Kabul by mistake. The incident sparked large demonstrations in Kabul and other provinces in which several people were killed.

F. Brinley Bruton reported from London. Mushtaq Yusufzai reported from Peshawar, Pakistan. Ahmed Mengli reported from Kabul, Afghanistan. Courtney Kube reported from Washington, D.C.