MANILA/MARAWI CITY - President Rodrigo Duterte was eager to credit new ally Beijing in the death of militant leader Isnilon Hapilon, saying it was a Chinese rifle that fired the bullet that finished off Islamic State's "emir" in Southeast Asia.

The smoking gun that took out the region's most feared insurgent on Monday was one of the 100 sniper rifles donated by China, Duterte said, although the Scout Ranger unit conducting the operation said the shot was fired from a heavier weapon mounted on an armored vehicle.

Duterte is a huge fan of the Chinese rifles and took a pot-shot himself in the direction of militants in Marawi City recently. Addressing businessmen and diplomats, he singled out ambassador Zhao Jianhua for China's support that led to the crucial killing.

"I would like to officially inform you, Ambassador Zhao, that the rifle that killed Hapilon was a sniper rifle made in China," Duterte announced late on Thursday, to warm applause from the crowd.

But the version of the final hours of the life of Hapilon and another rebel leader, Omarkhayam Maute, posted on the Facebook page of a member of the Army Scout Rangers, tells a different story.

The blow-by-blow account on "Scout Ranger Books", posted the day Hapilon was killed, tells of how the 8th Scout Ranger Company was engaging militants and was not aware the rebel commanders were among those they killed, until fleeing hostages told them.

The soldiers operating at night used thermal imaging on an armored vehicle and the shot that killed Hapilon came from a gun mounted on top of it, according to the account. No mention was made of Chinese weapons or snipers.

Prior to Duterte's remarks, two soldiers in that vehicle told CNN Philippines the fixed weapon was remote controlled. A general in Marawi in command of the armored assets told Reuters the fixed weapons are 50-caliber machine guns.

Duterte has made a big effort to befriend China and has frequently praised its leadership while in contrast, chiding defense treaty ally the United States, its biggest source of weapons and expertise, for what he calls hypocrisy and for treating his country "like a dog".

Asked which gun killed Hapilon, Colonel Romeo Brawner, deputy commander of the Marawi task force, said he could not say for sure, as troops had used guns made by the United States, China and others countries.