Rio de Janeiro mayor Marcelo Crivella was arrested on Tuesday as part of a corruption investigation just nine days before the end of his term in office.

The judge leading the investigation, Rosa Helena Penna Macedo Guita, called him "the head of a criminal organization ... installed within the Rio mayor's office with the aim of obtaining illicit profits in the most varied ways."

After a two-hour hearing, she ordered him held in custody and television footage later showed him being transferred to a prison in the city's north.

Hours later a judge granted permission for the mayor to be held under house arrest, but Crivella will have to wear an electronic ankle bracelet, submit all his telephone and computers and not have any contact with third parties.

GloboNews television channel had broadcast footage of police arresting the mayor at his home in the upscale Barra de Tijuca neighborhood just before 6:00 am (0900 GMT).

"I'm the mayor that's done the most against corruption in Rio de Janeiro. I ask that justice be served," said Crivella.

He received support from far-right President Jair Bolsonaro at last month's municipal elections but was soundly beaten.

Crivella claimed to be the victim of "political persecution."

Several other people were also arrested as part of the same operation including businessman Rafael Alves, the suspected mastermind.

He is the brother of Marcelo Alves, the president of municipal tourism agency Riotur.

Mauro Macedo, Crivella's former campaign treasurer, was also arrested.

Rio de Janeiro mayor Marcelo Crivella has been arrested as part of an investigation into corruption
Rio de Janeiro mayor Marcelo Crivella has been arrested as part of an investigation into corruption AFP / MAURO PIMENTEL

He is the cousin of evangelical preacher Edir Macedo, who is also Crivella's uncle.

According to the investigation, which began in 2018, companies that wanted to secure contracts with Riotur gave checks to Rafael Alves.

"The criminal organization collected at least 50 million reais (around $10 million) from what we've been able to discover," said Deputy Attorney General Ricardo Ribeiro Martins.

During his re-election campaign Crivella, 63, claimed his center-right opponent Eduardo Paes, who beat him by 64 percent to 36 percent, would go to prison for corruption.

Crivella is a former pastor, missionary and gospel singer. Throughout his mandate, Crivella faced investigations over mismanagement, accused of mixing politics and religion and favoring members of his church.

In July 2018, according to O Globo newspaper, Crivella promised some evangelical preachers that members of Edir Macedo's Universal Church of the Kingdom of God would receive priority for cataract operations in municipal clinics.

The public prosecutor's office recently opened an inquiry into the suspected use of Macedo's church to launder money.

After the highs of hosting the 2014 World Cup final and 2016 Olympic Games, Rio has since plunged into political and financial crises.

Rio state governor Wilson Witzel was dismissed in August over corruption suspicions.

Before him, the five previous Rio state governors found themselves investigated by the courts and four were even sentenced to prison time.