Their windows broken and roofs smashed, the abandoned homes in an otherwise bucolic valley carpeted with cornfields and orchards near Serbia’s border with Bosnia look like the wreckage of the Balkan wars of the 1990s.

But the houses are actually the casualties of a current struggle freighted with geopolitics: where and how Europe can get the materials it needs to make electric car batteries and break its dependence on sources like China.

The houses, in the Jadar Valley in the west of Serbia, were bought up years ago by the minerals behemoth Rio Tinto, which planned to tear them down and start mining and processing lithium, a crucial element for electric car batteries. Its plans stalled by vociferous opposition, the company left the properties to crumble.

The project has been supported by the United States and the European Union, which is in desperate need of lithium to meet its climate goals. But it has generated a wave of public fury in Serbia, where fears that the mine will poison the air and water have set off huge street protests against President Aleksandar Vucic.

Europe has plenty of lithium and more than 20 mining projects for the mineral at various stages of development. But none have started producing battery-grade lithium. The giant project in Serbia was aimed at filling that hole.