MANILA (Reuters) - Philippine police commandos killed six bodyguards on Wednesday who worked for a town mayor who had turned himself in over links to the illegal drug trade, as President Rodrigo Duterte's anti-drug war shifted from street peddlers to officials.

Close to 400 people have been killed in police operations against illegal drugs since Duterte was sworn in as president on June 30. Media and rights groups have put the figure almost twice as high at 770, including more than 200 killed by vigilante groups.

The number of drug-related killings has alarmed human rights groups, who have called on the United Nations to condemn the rise in extrajudicial killings in the Philippines. The Philippine Senate is to hold a legislative inquiry.

National police spokesman Dionardo Carlos told reporters there had been a gunbattle between the police and bodyguards working for Rolando Espinosa after police went to search Espinosa's home on Leyte island in the central Philippines earlier on Wednesday.

Espinosa, mayor of Albuera town, turned himself in to the national police chief on Tuesday after Duterte asked him and his son, Kerwin, to surrender over their involvement in the drug trade, warning they would be killed if they resisted arrest.

Espinosa has publicly denied any part in the drug trade but said his son was peddling "shabu" (methamphetamine), which he gets from a jailed Chinese drug trader.

"The incident this morning was related to the investigation on alleged drug trade by the mayor and his son," Carlos said.

He said six men were killed and six others escaped.

"We have recovered 13 high-powered firearms and five pistols from the scene," he said. Charges would be laid against the mayor for keeping unlicensed guns, Carlos said.

The raid signaled a shift in Duterte's drug war from running after street-level peddlers and users to powerful regional politicians and foreign drug traffickers.

Duterte has promised to name dozens of governors, mayors and other politicians he says are involved in the drug trade after identifying three police generals and two former police generals who were protecting drug traffickers.

Police said charges had been filed against another mayor from the southern island of Mindanao after he escaped from a police raid last week, when 16 people were arrested 1 million pesos ($21,263) worth of drugs were seized.

($1 = 47.0300 Philippine pesos)

(Reporting By Manuel Mogato and Jules Elona; Editing by Paul Tait)