Afghanistan and India have welcomed the Afghan war strategy recently unveiled by the U.S. president, but Pakistan came out on the defensive, rebuking Donald Trump for admonishing Islamabad over its affiliation with jihadist organizations.

China, which borders Afghanistan, came out in defense of its ally Pakistan, saying the country was on the front line in the struggle against “terrorism” and had made “great sacrifices” and “important contributions” in the fight, reports Al Jazeera.

“We believe that the international community should fully recognize Pakistan’s anti-terrorism,” Hua Chunying, a spokeswoman for China’s foreign ministry, told reporters, adding that China hoped “the relevant US policies can help promote the security, stability, and development of Afghanistan and the region.”

President Trump urged Afghanistan, Pakistan, and India to step up their commitment to finding a solution to the 16-year-old war.

Some Pakistani leaders rejected Trump’s sharp rebuke of Islamabad and his efforts to expand India’s involvement in neighboring Afghanistan.

“We must reject being made scapegoats for the policy failures of the US and India,” proclaimed Imran Khan, chief of Pakistan’s Tehreek-e-Insaf (PTI) political party, reports Dawn. “Just as India blames Pakistan for the indigenous Kashmiri uprisings when these are a result of its own failed policy of military repression in India-held Kashmir, the US again blames Pakistan for its deeply flawed and failed Afghan policy stretching over a decade.”

Maj. Gen. Asif Ghafoor, a spokesman for the Pakistani army, reportedly dismissed the president’s comments, claiming Islamabad has targeted terrorists operating on its soil.

“There are no terrorist hideouts in Pakistan,” claimed the military spokesman.

Despite the criticism for Trump’s Afghanistan agenda stemming from Pakistan, Khwaja Muhammad Asif, the country’s foreign minister, reportedly met U.S. Amb. David Hale and emphasized Islamabad’s “desire for peace and stability in Afghanistan,” according to a statement by the foreign ministry.

Asif “underlined Pakistan’s continued desire to work with the International Community to eliminate the menace of terrorism,” noted the statement.

Meanwhile, New Delhi welcomed Trump’s strategy, particularly his administration’s willingness to pressure its rival Pakistan to stop lending support to Islamic terrorists, some of whom are also known to operate in India.

In a statement, India’s Ministry of External Affairs noted that it embraced Trump’s “determination to enhance efforts to overcome the challenges faced by Afghanistan and in confronting issues of safe havens and other forms of cross-border support enjoyed by terrorists,” notes Al Jazeera.

Without explicitly naming its rival Pakistan, the ministry added, “India shares these concerns and objectives.”

New Delhi reaffirmed its policy of lending reconstruction aid to Afghanistan. Since the start of the Afghanistan war in October 2001, India has provided an estimated $2 billion in aid to Afghanistan.

Trump’s new war strategy was also received well in Kabul.

Afghan President Ashraf Ghani lauded the plan, saying it would improve the capability of the training mission for Afghan security forces, which includes military and police units.

The speech is proof that the United States is “with us, without any time limit,” Ghani told Afghan troops on Tuesday in southern Kandahar province, the birthplace of the Taliban located along the Pakistan border.

“I am grateful to President Trump and the American people for this affirmation of support for our efforts to achieve self-reliance and for our joint struggle to rid the region from the threat of terrorism,” said President Ghani in a statement. “The U.S. Afghan partnership is stronger than ever in overcoming the threat of terrorism that threatens us all. The strength of our security forces should show the Taliban and others that they cannot win a military victory. The objective of peace is paramount.”

During his speech, Trump blasted Pakistan but praised its rival India for its support for Afghanistan, saying it was a “critical” component of his South Asia strategy, referring to his war plan.

“For its part, Pakistan often gives safe haven to agents of chaos, violence, and terror,” declared the U.S. commander-in-chief. “The threat is worse because Pakistan and India are two nuclear-armed states whose tense relations threaten to spiral into conflict. And that could happen.”

“We appreciate India’s important contributions to stability in Afghanistan, but India makes billions of dollars in trade with the United States, and we want them to help us more with Afghanistan, especially in the area of economic assistance and development,” added President Trump.