Methane is being extracted from a former Wrexham colliery to produce electricity for about 3,000 homes.
Coal production ceased at Llay Main Colliery in 1966
Coal production stopped in Llay in the 1960s, but 40 years on a renewable energy company has started reusing the site.
The company behind the scheme, ENER.G Natural Power, had traditionally been capturing methane from landfill sites.
However, in 2004 they started using the natural gas from Llay Main Colliery.
A company spokesman said the power extracted was fed straight into the National Grid, and it was not possible to identify which homes receive their electricity from the former mine.
Llay Main Colliery was the last major mine to be opened on the north-east Wales coalfield and began production in the early 1920s.
The village of Llay was built for miners, with the different grades of housing reflecting their occupiers' different status within the mine. At its peak, Llay Main produced nearly 23,000 tonnes of coal per week.
With a workforce of 2,500, it was a key employer in the local economy. However, the colliery closed in March 1966 due to geological problems.
Hugh Richmond, managing director of ENER.G Natural Power, said methane gas was the second most abundant greenhouse gas resulting from human activities.
Even after coal production has ceased the gas continues to seep from exposed coal faces and collects in the old working voids.
"There are hundreds of closed deep mines in the UK alone from which methane gas is seeping into the atmosphere.
"Coal mine methane is a viable short term alternative as we look for other renewable and sustainable energy sources," he added.
A well has been drilled into land surrounding the former colliery to collect the gas.
Recently the pressure has dropped and it is anticipated that in the near future the company will have to start to pump the gas to continue generation.