DANANG, Vietnam (Reuters) - Philippine President Rodrigo Duterte thanked Moscow on Friday for its “timely assistance” in defeating pro-Islamic State militants who took over a southern city for months, expressing his willingness to buy Russian weapons.

Philippines' President Rodrigo Duterte attends the APEC-ASEAN dialogue, on the sidelines of the APEC summit, in Danang, Vietnam November 10, 2017. REUTERS/Jorge Silva

Duterte last month declared the liberation of Marawi City from Islamist militants after 154 days of fighting, which killed more than 1,100 people, including 165 soldiers, and displaced nearly 400,000 residents.

“I want to build a strong armed forces and a strong police and the reason is very important for you to know that we are eyeing - we are buying arms from Russia this time,” Duterte told Russian President Vladimir Putin on the sidelines of the Asia-Pacific Economic Cooperation (APEC) summit in Vietnam.

The Philippines was to buy more than 20,000 assault rifles from the United States, but some senators, concerned with Duterte’s human rights record and rising killings, blocked that sale.

But China and Russia, whose relations with the Philippines have vastly improved in recent months, donated a total of 11,000 assault rifles and trucks.

“Your timely assistance to my country helped us replenish the old arms and the spent bores that were fired repeatedly and we have a new stock,” he said, in transcripts sent to Manila by the presidential communications office.

Manila and Moscow signed a military deal on logistics, including a contract with a state-owned company for the supply of equipment, during the first-ever visit by a Russian defense minister to the Philippines last month.

The Philippines will have a 125 billion pesos ($2.44 billion) fund to modernize the military from 2018 to 2022 through a multi-year congressional allocation to upgrade its hardware, a senior military official told Reuters.

“We are looking at helicopters, small arms and equipment for humanitarian assistance and disaster relief operations, but we are still discussing the specifics,” said the same military official who declined to be named because he was not authorized to talk to the press.

“We still prefer U.S. and Western equipment but they are very expensive. If the Russians and Chinese equipment can be comparable in quality, then they can be excellent alternatives.”