FILE - In this Jan. 8, 2018, file photo, Dinh La Thang appears in court in Hanoi, Vietnam. The court in the capital Hanoi sentenced former Politburo member Dinh La Thang, ex-chairman of state energy giant PetroVietnam, to 13 years in jail for deliberate economic mismanagement Monday, Jan. 22, 2018 as the two-week trial concluded. Thang was the first Politburo member to be jailed in decades. (Doan Tan/Vietnam News Agency via AP, File)

Trinh Xuan Thanh, center, listens to the verdict in Hanoi, Vietnam, Monday, Jan. 22, 2018. The former oil executive was sentenced to life in prison on charges of embezzlement and mismanagement at the end of the two-weeks trial that also involves 21 others including former Politburo Dinh La Thang. Germany accused Vietnam of kidnapping Thanh from a Berlin park in July, the charge Vietnam denied saying Thanh turned himself in to police voluntarily. (Doan Tan/ Vietnam News Agency via AP)

Trinh Xuan Thanh, center, is led to a court room by police in Hanoi, Vietnam, Monday, Jan. 22, 2018. The former oil executive was sentenced to life in prison on charges of embezzlement and mismanagement at the end of the two-weeks trial that also involves 21 others including former Politburo Dinh La Thang. Germany accused Vietnam of kidnapping Thanh from a Berlin park in July, the charge Vietnam denied saying Thanh turned himself in to police voluntarily. (Doan Tan/ Vietnam News Agency via AP)

HANOI, Vietnam (AP) — A former oil executive was sentenced to life in prison and a former high-ranking Vietnamese government official received a lengthy prison term Monday at the end of a major corruption trial.

The 22 defendants in the case were mostly current or former executives at PetroVietnam and were convicted of mismanagement, embezzlement or both in their tenures at the state energy giant.

Foreign media were not allowed to attend the two-week trial, though more than 100 Vietnamese gathered outside the courthouse as the sentences were announced.

Former PetroVietnam chairman Dinh La Thang, the first Politburo member to be jailed in decades, was sentenced to 13 years in jail by the People's Court in the capital, Hanoi. He was accused of deliberate economic mismanagement that cost the state millions.

Trinh Xuan Thanh, an ex-chairman of PetroVietnam's construction arm, was given life imprisonment for embezzlement. Thanh was also convicted of economic management. Germany accused Vietnam agents of snatching him from a Berlin park last year, a charge Vietnam denied, saying Thanh turned himself in to police voluntarily. The incident strained relations between the two countries.

In Germany, foreign ministry spokeswoman Maria Adebahr said German, French, EU and U.S. diplomats were able to observe the trial, and that Germany had "taken note" of the fact that Thanh did not receive the death penalty. She declined to comment further, but voiced regret that the media and a German lawyer weren't allowed to attend the trial.

Thanh was also ordered to pay compensation of $1.5 million and Thang $1.3 million.

Three other former chairmen of PetroVietnam were sentenced to nine years in jail each for economic mismanagement. Punishment for the other defendants ranged from 22 years in prison to suspended sentences.

The Tuoi Tre newspaper quoted a judge as saying the prosecutions were "well-founded."

The Communist Party under the watch of General Secretary Nguyen Phu Trong is waging an unprecedented crackdown on corruption, with PetroVietnam and the country's banking sector at the center.

Thang was convicted of "deliberately violating state economic management regulations, causing serious consequences" by choosing PetroVietnam's Construction Joint Stock Co., or PVC, to build a thermo power plant without a proper bidding and appraisal process.

Thang was accused of ordering an advance payment of $67 million to PVC, which did not use the funds for the proper purpose, causing losses of $5.5 million to the state.

A retired government official, speaking outside the court, said the sentences were tough enough.

"I think the sentences handed down were fair. It is necessary for the country to fight against corruption," the retiree, Hoang Dinh Thanh, 70, said.

Jonathan London, a lecturer at the Leiden University in the Netherlands and a Vietnam expert, said further reforms and commitments by the Communist authorities are needed to root out corruption.

He said while the jail sentences may be dramatic, history in other countries suggests in the longer term that corruption is not best fought by punishment "but precisely the kinds of institutional reforms and levels of commitment to transparency that Vietnamese public opinion has been calling for, but which Vietnamese leaders have been unfortunately unwilling to embrace."

Thang is accused of economic management in another case for his role in PetroVietnam's purchase of shares worth $36 million in Ocean commercial joint bank. PetroVietnam lost all of its investment when the State Bank of Vietnam bought the bank for nothing. He is expected to stand trial in the coming months.

Thang was once a rising political star but was dismissed from the all-powerful Politburo in May and was subsequently fired as Communist Party secretary of the southern commercial hub of Ho Chi Minh City. He was arrested on Dec. 8.

In the meantime, Thanh is scheduled to be put on trial on Wednesday on charges of embezzling $622,000 from a property development project.

Another trial involving 46 defendants, including many former bankers, is currently taking place in Ho Chi Minh City.