China gave 3,000 assault rifles to the Philippines on Thursday as a gesture of “friendly and cooperative relations”, the second shipment of rifles to the Philippines this year as President Rodrigo Duterte seeks closer ties with old foe Beijing.

Philippines Defence Secretary Delfin Lorenzana said the Chinese weapons were supposed to go to the military, but Duterte felt the police needed them more.

“We are lucky that the Chinese government provided the firearms,” Lorenzana said at a news conference, where stacks of rifles were on display.

The rifles, worth about $3.3 million, will all go to the Philippine National Police (PNP), which needs to fill a shortfall of guns after some US legislators blocked the sale of about 26,000 M4 rifles to the police last year.

The freeze on that sale came amid concerns about the United States arming a police force accused of widespread human rights abuses during Duterte’s fierce war on drugs, which has killed thousands of Filipinos.

Duterte, who has been critical of the Philippines-US alliance, is eager to develop closer trade and political ties with old foe China.

China gave 3,000 assault rifles and 100 sniper rifles to the Philippines in June, part of a new wave of diplomacy to engage a country with which Beijing has a bitter history of territorial disputes in the South China Sea.

The military also gave those guns to the police, but kept the sniper rifles for themselves.

Beijing’s donations so far remain small compared with arms transfers from the United States, a defence treaty ally with the Philippines since the 1950s. Washington has in the past 17 years provided nearly a billion dollars of military aid, including drones, ships, surveillance planes and assault rifles.

Duterte has a notorious grudge against the United States and accuses it of hypocrisy and of making his country a potential target for aggression. He has also complained about troops receiving used, “hand-me-down” American weapons, and applauded China’s donation of new ones.

Washington and Manila have for decades held joint exercises, as many as 300 a year, and the programmes remain intact, despite repeated threats last year by Duterte to cancel them and abrogate bilateral defence pacts.

They are set to increase those exercises next year, said Military chief general Eduardo Ano, who agreed last week with his US counterpart to hold more maritime security, counter-terrorism and humanitarian assistance programmes.