JAKARTA, Indonesia — The quiet afternoon coffee date nine months ago at an upscale Jakarta cafe ended when Wayan Mirna Salihin, after one sip of her iced Vietnamese coffee, collapsed suddenly. Hours later, she was dead.

An autopsy on the 27-year-old woman’s body found that she had died of cyanide poisoning. On Wednesday, a court in Indonesia ruled that her coffee companion, Jessica Kumala Wongso, killed her friend by spiking her drink.

The verdict, in what has been called the “coffee murder” case, was read on live television. TV One, a private national broadcaster, showed every minute of the trial, which gripped Indonesia as well as Australia, where the women attended college together.

When Ms. Wongso was sentenced Wednesday to 20 years in prison, her supporters, who packed half the courtroom, could be heard gasping at the verdict. Ms. Wongso denounced the ruling as “unfair and one-sided” as she was led from the courtroom by the police. Members of the victim’s family broke down in tears.