The court order came after a Pakistani woman challenged Sri Lanka's decision to expel foreign nationals despite warnings that doing so may violate international law.
A court official said judge A. W. A. Salam, head of the Court of Appeal, had on Friday ordered the defence ministry to suspend the deportations.
"The case will be called again on August 29," said Lakshan Dias, a Sri Lankan lawyer representing the Pakistani petitioner. "For the moment we have stopped the refoulement (forced return)."
He said the government had deported 28 foreigners in the past two weeks and arrested another 75 and were holding them at a detention centre in the island's south.
Another 1,800 foreigners, including Afghans, Iranians, Pakistanis and Palestinians, risked being sent back, he said.
The United Nations High Commissioner for Refugees (UNHCR) had expressed dismay over Colombo's arrest and deportation of dozens of foreign asylum seekers and warned that Colombo was in breach of its international obligations.
The UNHCR had said that deportations went against the principle of no forced return, or non-refoulement, enshrined in international law.
The agency added that returning an individual to a country where they would face a risk of torture was also prohibited under the UN's Convention Against Torture, which Sri Lanka had ratified.
Hundreds of Pakistani Christians and Afghans fleeing persecution in their countries have been arriving in Sri Lanka seeking UNHCR protection in the capital Colombo.
Sri Lanka had earlier defended the action taken against the asylum-seekers, saying that a state's responsibility to international obligations had to be "nuanced and balanced in the context of domestic compulsions".
Sri Lanka's External Affairs Ministry also accused the UNHCR of processing asylum claims too slowly, and of not taking responsibility for repatriating those whose refugee claims were rejected.
Sri Lanka recently tightened visa restrictions on Afghan and Pakistani nationals in a bid to discourage asylum seekers arriving on the island.