Magnesium chloride, the chemical used to make tofu and bath salts, could become a key ingredient in the production of solar cells, according to a University of Liverpool study.

Researchers said that Cadmium chloride is currently an important part of solar cell technology, used to manufacture solar panels around the world. Due to the substance's high toxicity, workers practise elaborate safety measures to protect themselves during production. They also implement special disposal measures when discarding the panels.

They said that magnesium chloride mined from seawater has been found to be effective and as an excellent replacement to the expensive soluble compound. The chemical costs $0.001 per gram compared to $0.3 - saving the industry a huge amount of money and lowering the overall cost for producing solar power.

"If renewable energy is going to compete with fossil fuels, then the cost has to come down. Great strides have already been made, but the findings in this paper have the potential to reduce costs further," said Physicist Dr Jon Major from the University's Stephenson Institute for Renewable Energy, in a press release.

Researchers said that a thin film of cadmium telluride is used to create cheapest solar cells thesedays. These cells convert less than two percent of sunlight into energy. The efficiency of conversion increases to 15 percent when cadmium chloride is applied.

However, the study has shown that even magnesium chloride can achieve the same efficiency.

"We have to apply cadmium chloride in a fume cupboard in the lab, but we created solar cells using the new method on a bench with a spray gun bought from a model shop," Major said.

The finding is published in the journal Nature.