HANOI, Vietnam (AP) — A Vietnamese court sentenced two former bosses of a state-owned shipping company to death on Monday after finding them guilty of corruption in a high-profile trial apparently aimed at showing the government’s intent in cracking down on graft.

Public anger at rampant corruption is chipping away at the legitimacy of Vietnam’s Communist leaders as they struggle with a stuttering economy and an explosion of online dissent. The leaders have vowed to get tough on graft, but there is skepticism that they have the will to tackle the deeply entrenched problem beyond stern sentencing measures.

The Hanoi People’s Court convicted Duong Chi Dung, former chairman of Vietnam National Shipping Lines, or Vinalines, and the company’s former general director, Mai Van Phuc, of embezzling $476,000 each.

Eight other defendants were given prison terms ranging from four to 22 years for graft or related crimes in the four-day trial.

Presiding Judge Ngo Thi Anh said the tough sentences were needed to deter corruption.

“All the defendants were party members and cadres and had many excellent achievements, but they became depraved and intentionally violated state regulations on economic management,” she said in announcing the verdict.

Dung was arrested in Cambodia in September last year after nearly four months on the run.

On Saturday, when he was allowed to address the court, he said he regretted mismanagement that caused huge losses to the state, but denied the corruption allegations.

“I did not receive a penny … it’s an injustice for me,” he said.

Dung and Phuc have 14 days to appeal the verdict. It was not immediately clear if they would. Capital punishment in Vietnam is by lethal injection.

Last month, a former banker at a state-owned bank and his business associate were sentenced to death for embezzlement.

Hanoi-based economist Nguyen Quang A said death sentences alone are not enough to prevent graft, which is prevalent in government and the network of state-run companies that dominate much of the struggling economy.

He said mechanisms were needed to stop graft from occurring in the first place.

The case involved kickbacks related to the purchase of an old floating dock from a Russian company in 2008. The dock, which was manufactured in Japan in 1965, is inoperable. Vinalines still has to pay $47,000 in monthly fees for the dock.

Many of Vietnam’s state-owned companies are weighed down by debt after years of mismanagement.

Vinalines has amassed debts of $3 billion, according to state media.