LISBON, Nov 8 (Reuters) - Portuguese anti-mining groups have urged the government to suspend and review all lithium projects while authorities investigate alleged corruption in the handling of "green" energy deals that have led to the resignation of the prime minister.

Antonio Costa resigned on Tuesday, hours after prosecutors detained five people, including his chief of staff, and named two formal suspects close to him in an investigation into lithium mining and hydrogen projects.

Costa's possible role is also being investigated by the Supreme Court of Justice after prosecutors said they had become aware the suspects allegedly used his name and authority to "unblock procedures" related to the deals. He has denied wrongdoing and said his conscience is clear.

With more than 60,000 metric tons of known lithium reserves, Portugal is Europe's biggest lithium producer, but its miners sell almost exclusively to the ceramics industry.

They are now preparing to produce the higher-grade lithium used in electric cars and electronic appliances, as Europe seeks to develop its own strategic energy resources to reduce dependence on suppliers like China.

Environment agency APA earlier this year gave environmental approvals for local company Lusorecursos to extract battery-grade lithium and for London-based Savannah Resources to develop four open-pit mines. Both projects are in northern Portugal.

Lusorecursos did not reply to a request for comment. Savannah said in a statement it was cooperating with the authorities who visited some of its locations, but that neither the company nor anyone one its staff was a target of the investigation

Lithium projects have faced strong opposition from local residents and environmentalists. They say the processes lacked transparency and have repeatedly warned of the "dangerous promiscuity" between decision-makers and mining companies.

They have also been demanding stronger regulation.

In a joint statement, eight anti-mining groups said the current situation was proof their concerns were legitimate, namely because APA President Nuno Lacasta was named a suspect along with Infrastructure Minister Joao Galamba, who previously served as energy secretary.

"Lithium mining projects in Portugal must be immediately cancelled to not allow territories and populations to be affected based on corrupt and unclear processes," the groups said.

They accused APA of working in the interest of mining companies and said the government had "created a network of business opportunities to benefit very few ".

APA did not immediately reply to a Reuters request for comment. It was confirmed on Tuesday that its offices had been searched as part of the investigation.

In 2019, Portugal's government came under fire from lawmakers for signing a contract giving exploration rights for lithium mining to Lusorecursos when the company was only three days old.

The UDCB movement, which is campaigning against mining expansion in the Barroso region, where Savannah Resources wants to develop its project, said in a separate statement that the environmental approvals given by APA should be reviewed.

"We believe that the suspension of any licensing, prospecting or exploration licences is imperative until criminal responsibilities can be properly ascertained," UDCB said. (Reporting by Catarina Demony, editing by Aislinn Laing and Nick Macfie)