Guatemala's former president has spent his first night in prison after a judge ordered his detention while hearings over alleged corruption take place.
Otto Perez Molina, 64, left the court in Guatemala City on Thursday under heavy police guard and was taken to a military prison in the capital.
On Tuesday, Congress stripped him of his immunity from prosecution which opened the way for criminal charges to be brought against him.
He has denied any wrongdoing.
The vice-president was sworn in as interim head of state ahead of elections this Sunday after Mr Perez Molina resigned on Thursday.
Alejandro Maldonado is expected to govern until the new president is sworn in on 14 January.
Mr Maldonado has only been in the post since mid-May, when his predecessor Roxana Baldetti resigned.
Ms Baldetti is accused of involvement in the same corruption scheme that Mr Perez Molina is said to have masterminded.
She is also being held in prison.
Analysis: Katy Watson, BBC Central America correspondent
Mr Perez Molina has been hanging on until the bitter end - determined not to resign, even amid weekly protests and calls for him to go.
But stripped of his immunity earlier this week, barred from leaving Guatemala and with an arrest warrant, he had little choice but to give himself up.
He maintains his innocence and his lawyer says he is prepared to face the accusations against him.
With presidential elections on Sunday, it sends a message that corruption won't be tolerated as it was in the past - people here see this as the start of a new chapter.
At least 100 people are being investigated in the scheme, dubbed La Linea, or The Line.
Investigators say it involved businesses paying bribes to government officials and customs officers in return for being allowed to evade import duties.
But until Wednesday night, the president had stood firm, saying he would serve out his term.
On Tuesday, a judge barred him from leaving the country "as a precautionary measure".
Earlier this week, he said he would be "very respectful and submit himself to the rule of law".
Mr Perez Molina's resignation on Thursday and arrest are a huge victory for an unprecedented anti-corruption protest movement that had swelled in recent months, with regular marches in Guatemala's major cities.