Netflix Inc. removed a suicide scene from an episode of the first season of its popular teen drama “13 Reasons Why,” following a debate over whether the show increased the risk of teen suicide.

Based on the book of the same name, “13 Reasons Why” is about a depressed high-school girl who takes her own life and sends a classmate a tape explaining why she did it and who she blames.

In the final episode of the first season—the story is told in flashback—the protagonist Hannah is shown slitting her wrists in the bathtub.

While a Netflix spokesman declined to comment, the company tweeted early Tuesday that, on the advice of medical experts, it decided to edit the scene from the episode. The show is produced by Viacom Inc.’s Paramount Television unit, which supported the decision to remove the scene, a person close to the show said.

“13 Reasons Why” has been praised by critics but criticized by health advocates and some media watchdogs who fear it glorifies suicide. The show, which premiered in March 2017, is set to start its third season this year.