NEW DELHI — During the debate last week over a United States-sponsored measure to throw Pakistan onto a global terrorism-financing watchlist, it appeared that Saudi Arabia and China were going to quickly shut it all down. The Pakistani foreign minister sounded a triumphant note.

“Grateful to friends who helped,” Foreign Minister Khawaja M. Asif posted on Twitter.

Just two days later, on Friday, Pakistan’s relief turned to alarm at the news that those two close allies had withdrawn their support, making it inevitable that Pakistan would be added in June to the “gray list” of the Financial Action Task Force, a global body created to fight terrorism financing and money laundering.

The country will have a year to show that it is acting against extremist groups, shutting down their financing streams and prosecuting their leaders, or it could face having its banks cut off like those of Iran and North Korea were. Already, the gray-listing will make it harder for Pakistan to access international markets, and it has $3 billion in debts coming due this summer.

Pakistan has been on that gray list before, for a three-year stretch that ended in 2015, and this week Pakistani officials publicly expressed doubt that anything worse would happen.