Portuguese Prime Minister Antonio Costa submitted his resignation on Tuesday after police raided his official residence as part of a corruption investigation.
He announced his decision in a televised address to the nation after meeting with President Marcelo Rebelo de Sousa.
Prosecutors are investigating alleged irregularities committed by Mr Costa’s majority Socialist administration in handling lithium mining and hydrogen projects in the country.
Officers searched Costa’s official residence and detained his chief of staff, Vítor Escária, Portugal’s attorney general confirmed on Tuesday.
Over 40 searches were carried out at several government buildings, including Escaria's office and the infrastructure and environment ministries.
Infrastructure minister Joao Galamba has also been named by prosecutors as a formal suspect.
In his address, Mr Costa maintained his innocence but insisted he would “fully cooperate” with the justice system after prosecutors said he was also the target an investigation.
“The dignity of the functions of prime minister is not compatible with any suspicion about his integrity, his good conduct and even less with the suspicion of the practice of any criminal act,” he told reporters.
Prosecutors are investigating alleged malfeasance, corruption of elected officials, and influence-peddling related to lithium mine concessions near Portugal's northern border with Spain, and plans for a green hydrogen plant and data centre in Sines, on the south coast.
The prosecutor's office said that the investigation has determined that the "suspects invoked the name of the prime minister" when carrying out their allegedly illicit activities.
The Supreme Court, the state prosecutor's office said, was also examining the suspects' "use of the prime minister's name and his involvement to unlock" the practices being investigated.
Portugal's lithium mines and green hydrogen projects are part of the green initiative being pushed by the European Union.