A court in Vietnam has sentenced a former oil executive, who was allegedly kidnapped by Vietnamese agents in Germany last year, to life in prison for embezzlement and violating state rules.

Trinh Xuan Thanh, the former head of state-run subsidiary PetroVietnam Construction (PVC), was given the life sentence by the Hanoi City court on Monday, as part of a widespread corruption crackdown, state media reported.

The court also jailed Thanh's former boss and board chairman of the parent company PetroVietnam (PVN), Dinh La Thang, for 13 years for his role in incurring million-dollar losses at the oil giant.

Twenty other officials at PVN and PVC were given nine to 22 year sentences.

After the start of the investigation, Thanh fled to Germany in 2016.

Germany's government claimed the oil executive was kidnapped in July 2017 from a park in Berlin as he sought political asylum. But, Vietnam police say he returned voluntarily and turned himself in.

In its ruling on Monday, the court said the defendants had abused their key roles at the oil company regarding projects of national importance, according to the state-run VNExpress news site.

Thang served as PVN board chairman between 2006 and 2011 before taking on political positions as the transport minister and later party leader of Ho Chi Minh City.

According to the indictment, he directly appointed Thanh as general director of PVC in December 2007 and boosted his power through various corporate decisions.

Under Thanh's leadership between 2008 and 2012, PVC incurred losses worth more than $5m.