ISTANBUL - Five people have been sentenced to death in connection with the killing of journalist Jamal Khashoggi inside the Saudi Consulate in Istanbul last year, Saudi Arabia's public prosecutor announced Monday, but the two most senior officials implicated in the case, including an adviser to Crown Prince Mohammed bin Salman, were cleared of wrongdoing.

The slaying of Khashoggi in October 2018 sparked a global outcry against the kingdom and led to greater scrutiny of a crackdown on dissidents pursued by the crown prince. Khashoggi, 59, a Saudi national who contributed columns to The Washington Post from self-imposed exile in the United States, had emerged as one of Mohammed's most prominent critics.

The verdicts came after a trial in Riyadh's criminal court that lasted nearly a year and was shrouded in secrecy. Court sessions were closed to the public, and foreign officials who attended were told not to reveal details of the proceedings. Human rights groups warned that the lack of transparency threatened to obscure the possible involvement of senior Saudi officials - including the crown prince - in the killing.

The CIA concluded last year that Mohammed had ordered Khashoggi's assassination, contradicting Saudi Arabia's insistence that the crown prince had no advance knowledge of the plot.

At a news conference in Riyadh on Monday, Shalaan al-Shalaan, a spokesman for the Saudi public prosecutor, declined to identify the five people who were sentenced to death. Three other people were sentenced to jail terms totaling 24 years.

Shalaan said two senior officials - Saud al-Qahtani, a royal adviser, and Ahmed al-Assiri, a former deputy head of intelligence - were investigated and exonerated. Mohammed al-Otaibi, who served as consul general in the Saudi Consulate in Istanbul when the killing occurred, was also cleared, the spokesman said.

Salah Khashoggi, the eldest of Jamal's four children, called the verdicts "just."

"We affirm our confidence in the Saudi judiciary on all its levels, in it being fair to us, and achieving justice," he wrote on Twitter.

But Hatice Cengiz, Khashoggi's fiancee, also on Twitter, said the findings were "not acceptable."

The Post's publisher, Fred Ryan, also criticized the outcome.

"The complete lack of transparency and the Saudi government's refusal to cooperate with independent investigators suggests that this was merely a sham trial," Ryan said in a statement. "Those ultimately responsible, at the highest level of the Saudi government, continue to escape responsibility for the brutal murder of Jamal Khashoggi."

Khashoggi, who lived in Virginia, visited the Saudi Consulate in Istanbul on Oct. 2, 2018, to obtain documents that would allow him to marry Cengiz. Turkish and Saudi investigators say Khashoggi was killed soon after he arrived at the mission, as Cengiz waited outside, by a team of agents who had flown to Istanbul from Saudi Arabia.

Shalaan said the killing resulted from a "snap decision" by the Saudi operatives. Turkish investigators have cast doubt on claims that it was spontaneous. They note that the Saudi team included an autopsy expert whose role included dismembering Khashoggi's body. Khashoggi's remains have not been found.

It is unclear when the trial concluded. Shalaan said attendees included Khashoggi's two sons and their lawyers, as well as representatives of the five permanent members of the U.N. Security Council - the United States, Britain, China, Russia and France - and Turkey.

The death sentences await confirmation by higher courts.

After the killing, Saudi authorities said they were investigating the roles played by Qahtani and Assiri in organizing and dispatching the team of agents that confronted Khashoggi inside the consulate.

The decision to investigate the two men - loyal and trusted aides of Crown Prince Mohammed - and to fire them from their posts suggested at the time that the Saudi leadership might be prepared to implicate at least a few high-level officials, as the kingdom faced its worst public relations crisis in decades.

Qahtani, a media adviser to Mohammed, was arguably the more powerful official. A strident defender of the royal family, he directed online attacks against critics of the crown prince. His swarm of Twitter operatives would berate religious scholars, dissidents and journalists in defense of Mohammed, earning Qahtani the nickname "Lord of the Flies."

Qahtani is also accused of overseeing the kingdom's crackdown on dissidents and directing the torture of Loujain al-Hathloul, a prominent women's rights activist who has been imprisoned since last year. Saudi officials have denied that the activists were tortured.

The Trump administration last year imposed sanctions on 17 Saudi citizens implicated in Khashoggi's death. They included Qahtani, who officials said was "part of the planning and execution of the operation that led to the killing."

Shalaan said Monday that Qahtani was "investigated by the public prosecutor and was not charged because of lack of evidence against him."

Assiri, the former deputy head of intelligence, was initially charged after prosecutors said he was responsible for issuing the order for Khashoggi's forcible return to Saudi Arabia. Shalaan said Monday that Assiri's guilt "was not proved."

President Trump has vigorously defended Saudi Arabia and the crown prince, arguing that the relationship between the kingdom and the United States is too important to be derailed by Khashoggi's death.

A senior State Department official, speaking anonymously under rules imposed by the department, called the verdicts "an important step in holding those responsible for the terrible crime accountable."

"We've encouraged Saudi Arabia to undertake a fair and transparent judicial process, and we will continue to do so," the official said.

Later, the official called the Khashoggi killing "awful" but added: "Let's not lose sight of the fact 1,500 people were killed in recent weeks in Iran, according to Reuters. I'm not changing the subject. But there's a lot of atrocities around the world."

The killing widened a rift between Saudi Arabia and the government of Turkey, which first revealed the details of the grisly slaying inside the consulate.

Saudi Arabia said the killing was a rogue operation carried out by overzealous agents who had been instructed to return Khashoggi to Saudi Arabia alive.

Turkish officials remained skeptical Monday.

"The ruling of the relevant court in Saudi Arabia announced today on the murder of Mr. Jamal Khashoggi falls short of the expectations of Turkey and the international community for the clarification of all aspects of this murder and the serving of justice," Foreign Ministry spokesman Hami Aksoy said in a statement, according to the state-run Anadolu news agency.

A U.N. human rights investigator in June called for a U.N.-assisted criminal inquiry. Agnès Callamard, a special rapporteur with the Office of the U.N. High Commissioner for Human Rights, said that Saudi authorities participated in the destruction of evidence and that culpability for the killing extended beyond the Saudis who were charged.

Callamard called the verdicts announced Monday a "mockery."

"The hit-men are guilty, sentenced to death," she wrote on Twitter. "The masterminds not only walk free. They have barely been touched by the investigation and the trial. That is the antithesis of Justice."

Adam Coogle, a Middle East researcher for New York-based Human Rights Watch, said Saudi Arabia's "absolution of its senior leadership of any culpability in the murder of Jamal Khashoggi raises serious concerns over the fairness of the criminal proceedings."

The kingdom's handling of the killing, "from complete denial to hanging the murder on lower-level operatives in a trial that lacked transparency, demonstrates the need for an independent criminal inquiry," he wrote in a text message.

- - -

Dadouch reported from Beirut. The Washington Post's Greg Miller and Carol Morello in Washington contributed to this report.

This article was written by Kareem Fahim and Sarah Dadouch, reporters for The Washington Post. Dadouch reported from Beirut.