Pakistan condemned the U.S.’s bombing of nuclear sites in Iran while at the same time taking steps to build stronger ties with President Donald Trump, suggesting limits to how far Islamabad will go in supporting Tehran in the crisis.

Pakistan’s Shehbaz Sharif spoke with Iranian President Masoud Pezeshkian on Sunday, criticizing the U.S.’s action and offering solidarity with the Islamic Republic. While noting Iran’s right to self-defense, the prime minister called for dialog as the "only viable path forward,” according to a statement from his office.

The South Asian country’s top security body on Monday called U.S. and Israeli strikes "reckless actions” and warned that escalated tensions could "ignite a wider conflict” and diminish opportunities for dialog and diplomacy.