An inhaler that protects the lungs against air pollution has been developed by scientists and could help the many millions of people affected by toxic air to avoid its worst effects.

The inhaler delivers a molecule, first found in bacteria in the Egyptian desert, which stabilises water on the surface of the lung cells to form a protective layer. It is expected to be available as an inexpensive, over-the-counter product.

Outdoor air pollution is a global health crisis that kills over 3 million people a year and it has long been linked to lung and heart disease and strokes. But research is also uncovering new impacts on health, including degenerative brain diseases such as Alzheimer’s, mental illness and, this week, diabetes.

The impact of air pollution costs $5tn a year, according to a World Bank report published last week. In the UK, at least 40,000 people a year die prematurely from air pollution, with a cross-party committee of MPs calling it a “public health emergency”.

But the government’s plans to tackle the issue were heavily criticised this week, just as alerts were issued for extreme air pollution across much of northern England. A day later, it was announced that more ambitious plans for London from Mayor Sadiq Khan were overwhelmingly backed by the public.

Vehicles are a key contributor to air pollution but, a year after the VW emissions scandal broke, most new diesel cars still emit far more toxic nitrogen oxides on the road than the official lab-based limit.

Action to clean up air is urgently needed across the world, but cutting emissions for vehicles and other sources will take years, meaning ways to reduce the harm in the meantime could be vital. The new inhaler has been developed by German medical devices company Bitop and is based on a molecule called ectoine, discovered in the 1980s in a desert bacterium which uses the compound to conserve water in 60C heat.

“It is quite an inert molecule that does one main thing, which is bind water, which stabilises cell membrane tissues against physical or chemical damage,” said Dr Andreas Bilstein, at Bitop. “It supports the natural barrier.”

When inhaled, this helps prevent the damage caused by air pollution particles that can lead to asthma, chronic obstructive pulmonary disease (COPD) and lung cancer, Bilstein said: “Damage cannot occur as strongly and there is less inflammatory response, and so disease progression is reduced. The perfect situation is that the patient inhales in the morning and evening at home.”

The inhaler has been tested in three small groups of patients particularly at risk from air pollution, due to asthma, COPD and bronchitis, with the positive results due to be published soon, Bilstein said.

Ectoine does not interact with cell receptors, so it is classed as a medical device rather than a drug. This means large clinical trials are not required for official approval and the inhaler could be on sale soon, at an estimated cost of £17 a month, after Bitop selects a marketing partner. A version of the product for use in nebulisers will be available this year in Germany and Poland, while an ectoine-based nasal spray for allergy relief is already available.

Bilstein said the inhaler could be useful around the world, as particulate air pollution is not just a European problem: “Especially in Asia – China in particular – the demand for such a product is even higher. I was in New York last week, and the air was also not very clean.”

The protective effect of ectoine was discovered by Prof Jean Krutmann and colleagues at the Leibniz Research Institute for Environmental Medicine, while investigating whether the molecule could protect skin against sun damage. Bitop funded a series of studies, now published in prominent scientific journals.

“The point that it can prevent the lung inflammation induced by ultrafine particles is established – there is no more doubt,” Krutmann said. Antioxidants can also provide some protection but there has been controversy over the effectiveness of such food supplements, he said: “Personally, I think it is much better to eat lots of vegetables and fruit rather than taking any supplements.”

Dr Richard Russell, a consultant respiratory physician in the NHS and medical advisor to the British Lung Foundation, who was not involved in the research, said the inhaler was both credible and promising: “Ectoine is a beautifully elegant molecule and it clearly works by helping water to stabilise, giving you a film of water in times of stress.”

“The work that has been published thus far, in credible, internationally recognised journals, show that this stuff has positive properties, protecting against triggered inflammation,” he told the Guardian. Russell, who also lectures at Imperial College and Oxford University, said it might also be useful for the treatment of asthma, COPD and other lung diseases, not only prevention. “It could potentially do so much more. It is actually quite exciting and there is clearly a lot more to come from this story.”

Krutmann said slashing air pollution remained paramount. “It is very nice to be able to protect people against the detrimental effects, but this should not be used as an argument that we can now stop working on reducing particulate [air pollution]. The best thing is that we have clean air because then we don’t need any prophylactic treatment. But on the other hand we have to be realistic and in many countries you cannot just switch traffic overnight to electric cars and do other drastic things.”

“It will take many more years, especially in countries like China, and I think there is an ethical need to provide something to the general population to protect them,” he said.