The United Nations’ top court ruled Thursday that Myanmar must implement emergency measures to protect Rohingya Muslims against violence and preserve evidence of possible genocide.

The decision by the International Court of Justice on a request filed by Gambia is the first reckoning for Myanmar after decades of alleged atrocities against the beleaguered Muslim minority, including charges of indiscriminate killings, torture and rape.

Thursday’s ruling, the first step in a legal process that is likely to take years, did not make a final determination on whether Myanmar, which is led by Nobel Peace laureate Aung San Suu Kyi, could be found responsible for genocide, which is among the worst crimes under international law.

Those charges have been resoundingly rejected by Myanmar authorities, who have maintained that they were responding to an insurgency by Rohingya Muslim radicals and did not have any premeditated intention against the group.

The ruling does mean, however, that Myanmar must cease destroying any evidence of genocide, making it more likely that a court could find proof of this crime in the future, and that the government will have to take immediate steps to protect the minority living within its borders. Separate international proceedings at the International Criminal Court are underway against Myanmar, which is also known as Burma.

The ruling also sends a strong signal of hope to the more than 700,000 Rohingya Muslims who have lived in squalid refugee camps in neighboring Bangladesh since August 2017; they fled Myanmar amid accounts of rape, indiscriminate killing and torture. In addition, hundreds of thousands of Rohingya remain in Myanmar without citizenship rights or freedom of movement.

“As Rohingya, we feel vindicated today that the International Court of Justice has effectively established that genocide is the possible name of our persecution,” said Nay San Lwin, a co-founder of the Free Rohingya Coalition. “Justice is partially served. We know that there is a long road ahead, [but] this is a great day for the Rohingya.”

Abdulqawi Ahmed Yusuf, the current president of the court, said Thursday that the ICJ is “of the opinion that the Rohingya in Myanmar remain extremely vulnerable.” Yet, he added, Myanmar has not presented concrete measures to the court aimed at ensuring “the right of the Rohingya to exist as a protected group.”

The measures he announced Thursday mandated Myanmar to “take all measures within its power” to prevent acts of genocide against the group, including killings, rape, destruction of villages and land, and other actions “calculated to bring about the physical destruction of the Rohingya group.” Myanmar also must allow access to evidence of genocide and must report on its progress within four months — with a follow-up every six months thereafter.

Myanmar on Thursday also lost its legal challenge against the ICJ, which it contended does not have jurisdiction over the case, as well as against Gambia, which it said had no legal basis to bring the claim to the court.

Suu Kyi, Myanmar’s civilian leader, defended her country against the charges at The Hague last month, in what many saw as the completion of her fall from international human rights icon to a defender of mass atrocities. In an op-ed published Thursday in the Financial Times, Suu Kyi once again criticized human rights groups that she said have condemned her country “based on unproven statements without the due process of criminal ­investigation,” and she defended Myanmar’s efforts at accountability.

In comments to The Washington Post, Myo Nyunt, a spokesman for the governing National League for Democracy party, said Suu Kyi has urged her countrymen to stand together in the face of the decision.

“Right now, we can’t say what exactly our next steps will be,” he said, expressing sadness at the court’s ruling. “We have to study and learn what the impact of this decision will be on our state, which is a sovereign state.”

In November, Gambia, the smallest country in continental Africa, filed a lawsuit in the ICJ accusing Myanmar of genocide against Rohingya Muslims, in violation of a 1948 convention that both countries have signed. The ICJ can rule on disputes between states.

Experts in international justice said the court’s ruling that Gambia did indeed have a case against Myanmar set a strong precedent. The decision at the United Nations’ highest court also acknowledged that Rohingya Muslims constitute a vulnerable group that is in need of protection, they said.

“There was a level of complicity that existed around the Rohingya,” said Akila Radhakrishnan, the president of the New York-based Global Justice Center. “The ruling not only sends a signal to Myanmar that its flimsy excuses won’t be accepted, but also sends a signal to the rest of the international community that there are still some serious risks to the Rohingya that must be acted on.”

Many in Myanmar have overwhelmingly supported Suu Kyi in her defense of their country at The Hague, while also backing the military in its clearance operations against the Rohingya. During the hearing in December, hundreds of residents gathered outside the city hall in Yangon, Myanmar’s largest city, to watch the hearings broadcast live on huge screens. Banners supporting Suu Kyi and the military were erected all over the country.

However, some ethnic minority and civil society groups have backed the proceedings at the U.N. court, seeing the military’s actions as a pattern of behavior dating back decades.

A day before Thursday’s ruling, more than 100 civil society groups endorsed a statement saying that their country’s “political and military policies have always been imposed with violent force and intimidation upon the people of Myanmar, systematically and institutionally, on the basis of their political and religious beliefs and ethnic identities.”

“We civil societies wish to declare our commitment to working together on the side of truth and justice according to international human rights standards,” the statement added, welcoming the ICJ case.

Mahtani reported from Hong Kong. Cape Diamond in Yangon contributed to this report.