Lake Kivu, straddling the borders of Rwanda and the Democratic Republic of Congo, offers a landscape of extraordinary beauty, framed by towering volcanoes and lush green slopes rich with tea, coffee and banana plantations. But deep beneath the surface of the lake lurks a terrifying menace: waters saturated with methane, carbon dioxide and hydrogen sulfide gas. If released, this toxic combination could take the lives of the more than two million people that live along the lake’s shores.

For the moment the gas-laden water is trapped beneath a layer of heavy saline that prevents it from rising to the surface. But that barrier could be easily breached by an earthquake, a volcanic eruption, or even the growing pressure of the gases themselves. In Cameroon in 1986, a cloud of carbon dioxide exploded from Lake Nyos in a 100-meter fountain, killing almost 2,000 people as far as 25 kilometers from shore. Lake Kivu’s highly flammable methane mix presents an even greater risk to the region. Venting and flaring off the gas would minimize the risk of an eruption, but it’s environmentally irresponsible, as methane is a greenhouse gas far more potent than carbon dioxide.

To the government of Rwanda, the methane rich waters present not just a threat to be mitigated, but an opportunity. The country, like much of Africa, lacks sufficient power to meet its growing population’s needs. Tapping the estimated 60 billion cubic meters of methane in the lake’s depths could power the country at current rates for 400 years — a transformative prospect in a country that has few alternatives to the costly import of diesel fuel.

But Lake Kivu’s unique geological conditions are found nowhere else in the world; designing a system to exploit the energy potential of the methane while stabilizing the lake and protecting the environment took seven years and hundreds of million dollars. “Many came and concluded that this thing could not be done,” says Joseph C. Brandt, C.E.O. of Contour Global, the U.S. energy company that had been approached by the government of Rwanda to take on the project. And it wasn’t easy, he says. “We tried, and when we failed, we kept trying.” Eventually, he says, “Possibility became probability and then certainty.”

Energy industry insiders lauded the idea as a noble undertaking, but expressed doubt it would actually work, or be cost effective if it did. Contour Global and the government of Rwanda proved them wrong. When the project, called KivuWatt, flipped the switch on December 31, 2015, it exceeded expectations, producing energy in excess of the planned 25 megawatts from day one. On Monday, Rwandan President Paul Kagame presided over the official inauguration.

“Twenty five megawatts won’t address our energy problems,” the President told a crowd of international energy experts, ambassadors and government officials from neighboring Congo after a visit to the offshore barge that siphons the gas to the surface, “but it is an indication of what is possible in trying to address these challenges.” He then announced that the project would scale up to 100 megawatts, nearly doubling the country’s energy capacity, by 2020.

KivuWatt’s 3000-ton extraction barge, moored 13 km from Lake Kivu’s shoreline, draws the gas-laden waters from a depth of 350 meters. As the waters come closer to the surface, where there is less pressure, the gas bubbles out, much like what happens when a champagne bottle is uncorked. The gas is siphoned off for cleaning while the degassed water is injected back into the lake to maintain the ecosystem. Finally, the purified gas is piped back to the mainland where it fuels generators that supply electricity to the national grid. In a developed country, the current 25 megawatts would provide enough energy for 45,000 people. In largely rural Rwanda, it is already enough to radically transform livelihoods.

Noting that the project was plagued with doubters from the start, Kagame lauded the extensive scientific research and technological innovation that went into turning a potentially hazardous greenhouse gas into a commodity that could power the country’s development. He turned their challenges into an object lesson for a country seeking to overcome a troubled past to become Africa’s technological pioneer. The team behind the $200 million project, he said, “tried so many times, and they failed so many times. In the end we all succeeded. It is in the same spirit we try to live by, all of us, here in our country. We keep trying, we keep trying, and we don’t give up.”

The methane’s potential, both good and disastrous, has been known for decades. A local brewery, Bralirwa, tapped the underwater methane to fuel its factory for more than 40 years before production stopped in 2006. But scaling production to industrial standards was far more difficult. For Contour Global’s Brandt, the challenge, and the lake’s potential, was irresistible.

“If you think about Rwanda’s limited options for electricity, this is a great one. Because we are ameliorating the risk of methane release as well as generating power.” And proving that when it comes to powering Africa, sometimes it’s worth taking risks in order to manage them.

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.