THE HAGUE — In an extraordinary appearance at the International Court of Justice on Wednesday, Aung San Suu Kyi, Myanmar’s civilian leader, categorically rejected charges of genocide leveled against her country and repeated her government’s long-standing denial of culpability.

The former democracy icon and Nobel laureate had maintained an expressionless demeanor in court the previous day, as the tiny West African nation of Gambia spent hours detailing stories of systematic rape, murder and other brutality targeting the Rohingya Muslim minority in Myanmar.

Suu Kyi took the floor Wednesday to respond, her signature flowers woven into her hair. Speaking calmly and deliberately for nearly half an hour, she pointed to the role of Muslim militants — she did not utter the word “Rohingya” — in sparking the crisis and said the conflict is a domestic matter for her country to resolve.

Myanmar is “dealing with an internal armed conflict, started by coordinated and comprehensive attacks” by militants, she said. “If war crimes have been committed by members of Myanmar’s defense services, they will be prosecuted through our military justice system, in accordance with Myanmar’s constitution.”

Suu Kyi was under no obligation to come in person to the neo-Renaissance Peace Palace in The Hague, the seat of the court, to defend Myanmar against the charges filed last month by Gambia.

She became the first national leader to answer directly before the court while genocide is still alleged to be unfolding.

She is also the first recipient of the Nobel Peace Prize to be called to account for grisly crimes such as rape, murder, the burning of babies and the large-scale removal of an ethnic group. She was awarded the prize in 1991, for leading the opposition to the ruling military junta and calling for a nonviolent transition to a democratic society.

Her decision to appear in court put her in the position of defending military leaders she battled during her 15 years of house arrest.

But the move appeared to reflect a calculation that taking matters into her own hands would boost her at home ahead of elections next year.

Her appearance underscored what would be Myanmar’s main defense: that Gambia, which brought the case, does not have sufficient evidence to warrant the charges of genocide, one of the worst crimes under international law, and that the military was simply responding to a security threat.

She conceded that military officials may have crossed a line in responding to attacks by militants and used “disproportionate force.” But she said Myanmar’s justice system was addressing these allegations.

“Please bear in mind this complex situation and the challenge to sovereignty and security in our country when you are assessing the intent of those who attempted to deal with the rebellion,” she said. “Surely, under the circumstances, genocidal intent cannot be the only hypothesis.”

Rohingya Muslims said they took comfort in the fact that Suu Kyi and other top Myanmar officials were in the court under the watchful eyes of impartial judges.

The hearings “legitimized our pain,” said Yasmin Ullah, a Rohingya activist attending the hearings as a guest of the Gambian side. “The fact that Aung San Suu Kyi has to sit through all of those allegations — I’m sure no one had ever held them to account to that magnitude.”

Myanmar, also known as Burma, stands accused of “genocidal acts” that were “intended to destroy the Rohingya as a group, in whole or in part, by the use of mass murder, rape and other forms of sexual violence, as well as the systematic destruction by fire of their villages, often with inhabitants locked inside burning houses.”

U.N. officials have said Myanmar’s military had genocidal intent when it expelled the Rohingya Muslims from their villages in Rakhine state. Myanmar officials deny that it happened and blame Rohingya “terrorists” for the violence. International observers say thousands of Rohingya have been killed by the military and civilian mobs since the campaign started in late 2016.

This week’s hearings, which are unfolding over three days, have transfixed both sides of the violence.

Outside the courthouse, Rohingya activists denounced atrocities, while Suu Kyi supporters held up posters with her face and said that only she could help the country.

In refugee camps in Bangladesh, where almost 1 million ethnic Rohingya were forced to flee during the height of the military campaign, crowds chanted, “Gambia, Gambia,” in appreciation of their unlikely advocate.

And in Yangon, Myanmar’s largest city, hundreds of residents gathered outside city hall to watch the hearings broadcast live on a huge screen with local-language translation.

Rohingya Muslims said they were watching live streams of the hearing, huddled around shared smartphones. Ro Nur Deen, a 23-year old Rohingya in Sittwe, capital of Rakhine, the state where most Rohingya live, said he was shocked by Suu Kyi’s pronouncements of progress for Muslims there when their rights were being stripped away.

“The government has no shame,” he said. “They have no transparency and no accountability, but finally we are excited that they world can see the truth at the ICJ.”

Suu Kyi became Myanmar’s foreign minister as well as its de facto civilian leader after the country’s 2015 elections. She has repeatedly backed the military leadership, which retains a huge say in national affairs, and declined to intervene during the height of the violence.

Under her watch, Rohingya in Myanmar have continued to languish, segregated in squalid camps without access to education or citizenship rights. Rohingya and other Muslim minorities in Rakhine are also heavily restricted in their movements. Many among the country’s Buddhist majority believe the Rohingya are interlopers from Bangladesh who immigrated illegally, although the Rohingya say they are native to Rakhine.

This week’s hearings are not asking the court to rule on whether genocide has taken place, a process that is likely to take years. Instead, they are seeking “provisional measures” about whether the court holds jurisdiction and whether the charges are plausible enough that the Myanmar government should be compelled both to preserve evidence and halt ongoing violence in Rakhine state. About 600,000 Rohingya are estimated to remain in Rakhine, where they are still at risk.

A decision should come relatively soon, within weeks or months, observers said.

Tuesday’s hearing, in which Gambia and its advisers laid out the evidence, was an emotional moment for those at the stand and the Rohingya in the courtroom.

“Another genocide is unfolding right before our eyes, even as I make this statement to you today. Yet we do nothing to stop it,” said Gambian Justice Minister Abubacarr Tambadou, his voice at times cracking with emotion. “Every day of inaction means that more people are being killed, more women are being ravaged, and more children are being burned alive. For what crime? Only because they were born different.”

Gambia brought the case with the support of the 57-nation Organization of Islamic Cooperation. Tambadou, a former prosecutor at an international court for the Rwandan genocide, said he was motivated to take on the case after visiting Rohingya refugee camps last year. He used an often-ignored provision of international treaties against genocide to bring the charges to the tribunal.

In the courtroom, representatives of Gambia quoted witnesses interviewed by United Nations missions about the behavior of Myanmar’s military, known as the Tatmadaw.

“The Tatmadaw killed children in the courtyard. One witness recounted: ‘The soldiers killed the male members of my family. They shot at them first and then slit their throats. The courtyard was full of blood,’ ” said Andrew Loewenstein, one of the lawyers working for Gambia.

Other witnesses said that “some children were shot,” he added. “Other children were thrown onto a fire. A witness described how the soldiers took infants from their mothers’ laps and threw them into the river.”

Mahtani reported from Hong Kong.