A South Korean court sentenced the captain of a ferry -- which sank in April, killing more than 300 people onboard and plunging the country into prolonged mourning and soul-searching -- to 36 years in prison Tuesday.

Capt. Lee Joon-seok was convicted of gross negligence, but was also acquitted of a homicide charge, which claimed that he left the passengers behind while the ship was sinking.

Family members of the victims, most of whom were teenagers, immediately criticized the sentence for Lee and other crew members as too lenient, some weeping and shouting during the court proceedings.

The vessel's chief engineer got 30 years, and 13 other crew members were sentenced to up to 20 years in prison. The engineer, Park Ki-ho, was convicted of the homicide charge because he abandoned two injured colleagues, escaped the ferry and failed to tell rescuers about them, even though he knew they would die without help, the court statement said.

The court, however, cleared two other crew members of homicide charges for the same reasoning used to acquit the captain of homicide, the statement said. Those crew members got 15 and 20 years in prison, it said.

The court acquitted the widely vilified Lee of the homicide charge, for which he could have received the death penalty, because it was difficult to believe that he knew his actions would cause such a huge number of deaths, according to a court statement. It said that Lee had issued an evacuation order. South Korea hasn't executed anyone since late 1997, though its courts occasionally issue the punishment.

An official from the Justice Ministry, who requested anonymity because of office rules, said Lee, 69, will technically be eligible for parole after serving one-third of his prison sentence.

"Do you know how many children are dead?" one relative shouted out during the sentencing, according to Kook Joung-don, a lawyer for the relatives. "This isn't right," another screamed.

Prosecutors and the crew members have one week to appeal, according to the court.

The 15 crew members tasked with navigating the ferry Sewol have faced scathing public criticism because they escaped the sinking ship while many of their passengers were still trapped inside. A total of 476 people were aboard the ship and only 172 were rescued. Most of the dead were teenage students traveling to a resort island on a school trip.

Nearly seven months after the sinking, 295 bodies have been recovered, but nine are still missing. South Korean officials said Tuesday they've ended searches for the missing because there was only a remote chance of finding more bodies while worries have grown over the safety of divers. Two civilian divers have died after falling unconscious during searches.

"As our loved ones remain trapped in the cold waters, this decision is unbearably painful for us. But we requested that the search operations be stopped" because of safety concerns, Min Dong-im, 36, the wife of a missing teacher, tearfully said at a televised news conference.

Many student survivors do not remember hearing evacuation orders being given. Instead, the students were allegedly told to stay on the sinking ship before they helped each other flee.

The sinking has prompted widespread grief and a rare bout of soul-searching about lax safety practices. Authorities blamed overloaded cargo, improper storage, untimely recuse efforts and corruption by the ship's owners that prevented enough spending on safety, along with the crew members' behavior, for the sinking.

Last Friday, South Korean lawmakers approved plans to disband the coast guard and transfer its responsibilities to other government agencies. The coast guard was criticized for unprofessional, slow rescue efforts. Also last week, three relatives of the ship's billionaire owner were sentenced to up to three years in prison, about four months after the tycoon was found dead after he fled the law.

South Korea has spent months debating public safety issues that critics say were largely ignored while the country rose to an Asian economic power in the decades after the 1950-53 Korean War. But there have been a series of smaller deadly accidents since the sinking. In mid-October, for instance, 16 people watching an outdoor pop concert fell 60 feet to their deaths when a ventilation grate they were standing on collapsed.

The Associated Press contributed to this report.