Prosecutors in Guatemala have detained ex-president Alvaro Colom and almost his entire former cabinet in a corruption case involving a bus contract.

Colom, who governed from 2008 to 2012, is the latest in a series of former presidents to face legal problems.

He was recently named by the Organisation of American States as an envoy to Honduras, in a bid to help sort out disputed elections there.

Alvaro Colom is flanked by police in the courtroom (AP/Luis Soto)

Special prosecutor Juan Francisco Sandoval, who said Colom was arrested on Tuesday, is looking into the questionable purchases of public buses for Guatemala City.

Mr Sandoval said the detentions included the ex-interior minister and the former ministers of finance, defence, economy, education, labour, environment, health and sports and culture.

The case centres around a public bus company known as Transurbano.

The government auctioned off 25-year concessions for Guatemala City bus routes and the private companies that won the contracts were later exempted from taxes.

Prosecutors say the process was deeply flawed and included subsidies and other measures that benefited public servants.

A customs fraud scandal that allegedly sent kickbacks to then-president Otto Perez Molina and vice president Roxana Baldetti led both to resign in 2015.

They have been jailed awaiting trial but more than 100 defence filings have delayed the trial.

Alfonso Portillo, Guatemala’s president from 2000 to 2004, was extradited to the US and pleaded guilty to money laundering conspiracy in 2014.

He admitted accepting $2.5 million in bribes from the government of Taiwan to continue to recognise the Asian nation diplomatically.