Portuguese Prime Minister António Costa says he has handed his resignation to the president, after investigators searched his official residence in an inquiry into alleged corruption.
He announced his decision in a televised address after meeting President Marcelo Rebelo de Sousa.
Prosecutors said on Tuesday they were investigating concessions awarded for lithium mines and hydrogen production.
Two people close to Mr Costa have been detained, says Público newspaper.
Infrastructure Minister Joao Galamba has meanwhile been indicted as part of the inquiry into energy deals.
About 140 detectives searched the residence of the prime minister and several government ministries as part of the inquiry.
The prime minister said he was caught by surprise by the corruption investigation but said he would collaborate with it.