GUATEMALA CITY — A Guatemalan court on Tuesday ordered the extradition of a Mexican ex-governor to face charges of embezzlement and ties to organized crime in his home country.

Former Veracruz Gov. Javier Duarte, who was captured in Guatemala in April, agreed to accept extradition during the hearing.

The court ruled he should be extradited immediately, but it was not immediately clear how soon that could happen.

It would apparently take at least three days, and probably more, for the necessary legal steps and paperwork to be finished.

Duarte resigned as governor of the state of Veracruz in 2016, just before his term ended.

He has faced two hearings covering distinct sets of charges he faces in Mexico.

Duarte said earlier Tuesday he did not commit those crimes and would return to Mexico to clear his name.

His lawyer, Carlos Velasquez, said the Mexican government had not proven his client was the leader of a criminal enterprise.

Duarte’s time as governor of the Gulf state was marked by drug violence, growing state debt and murders of journalists.