BEIJING: As implausible as it may seem, China on Tuesday said the world community should acknowledge Pakistan's "outstanding contribution" to counter terrorism. China's defence of its all-weather ally came a day after US President Donald Trump lashed out at Islamabad for providing safe havens to terrorists.

Trump had on Monday blasted Pakistan saying the country has taken the US aid of billions of dollars but in return gave only deceit and lies.

Trump has also vowed to cut aid to Pakistan for failing to act against terrorist organisations operating on its soil.

"The United States has foolishly given Pakistan more than 33 billion dollars in aid over the last 15 years, and they have given us nothing but lies & deceit, thinking of our leaders as fools," Trump said in a series of Tweets posted on the first day of 2018.

The 71-year-old Republican leader said that Pakistan gives safe haven to the terrorists the United States hunt in Afghanistan.

Trump's tweet on stopping US aid to Pakistan in future has triggered a panic in the country on Monday with Finance Minister Khawaja Asif calling on Prime Minister Shahid Khaqan Abbasi to discuss country's foreign policy.

"The meeting held a detailed review of the Trump's statement," the Geo TV reported, citing its sources.

It said the two leaders also discussed on the country's foreign policy.

"We will respond to President Trump's tweet shortly inshallah...Will let the world know the truth..difference between facts & fiction..," Asif had tweeted.

On Tuesday China, on expected lines, praised Pakistan's counter terrorism record.

"Pakistan has made enormous efforts and sacrifice for the fight against terrorism and has made very outstanding contribution to the global cause of counter terrorism. The international community should acknowledge that," Chinese foreign ministry spokesman Geng Shuang said here when asked about Trump's criticism of Pakistan.

He said China is glad to see Pakistan engaging in international cooperation, including counter terrorism, on the basis of mutual respect so as to contribute to regional peace and stability.

"China and Pakistan are all weather partners. We stand ready to promote and deepen our all-round cooperation so as to bring benefits to the two sides," Geng said.

China is currently investing heavily in Pakistan as part of the USD 50 billion China Pakistan Economic Corridor (CPEC) over which India has raised objections as it passes through Pakistan-occupied Kashmir.

During the first ever trilateral meeting of the foreign ministers of China, Pakistan and Afghanistan here last week, Beijing had announced plans to extend the CPEC to Afghanistan which shares close ties with India.

Afghanistan also accuses Pakistan of sheltering Taliban militants, leading to a long running spat between the two countries. China is seeking to mediate between the two neighbours through the trilateral mechanism.

Analysts here say US is mounting pressure on Pakistan as it has firmed up an alliance with Beijing by allowing heavy Chinese investments in the strategic CPEC corridor providing China access to the Arabian Sea and the Indian Ocean.

Asked whether Trump's criticism would affect China's efforts to bring peace between Pakistan and Afghanistan, Geng said "We believe as neighbours China, Pakistan and Afghanistan are closely linked not only geographically but also in terms of common interests. It is natural for us to enhance communication and exchanges".

He said during the December 26 trilateral meet, the three countries "reached a lot of consensus" on cooperation.

This included the three nations enhancing cooperation on counter terrorism and fighting against terrorism in all forms and manifestations.

"The parties will enhance cooperation in this regard," Geng said.

In his strongest attack against Pakistan yet, Trump in his first tweet of the year on New Year's Day also appeared to suggest he could cut off foreign aid to Pakistan.

His remarks came days after the New York Times reported that the US is considering withholding USD 225 million in aid to Pakistan, reflecting its dissatisfaction with Islamabad's reluctance in the war against terrorism.

Unveiling his new South Asia policy in August, Trump had warned of tougher measures against Pakistan if it failed to cooperate with the US in the fight against terror.