A biomass power station could be built to provide enough energy for Anglesey Aluminium.
Anglesey Aluminium needs a new power supply when Wylfa closes
The deal for the plant is being brokered by the Welsh Assembly Government, the BBC understands.
Up to 1,500 jobs could be affected if Anglesey Aluminium closes when the life of the Wylfa nuclear power station comes to an end in around 2010.
An extension to the life of the nuclear plant is unlikely, according to First Minister Rhodri Morgan.
The biomass power station would burn rubbish, animal manure, woodchips, seaweed, corn stalks and other wastes, to heat water to create steam to turn turbines to produce around 300 megawatts of electricity.
In the long term, said Mr Morgan, the Anglesey Aluminium company was not interested in a new nuclear power station to replace Wylfa.
This was because the 10-15 years it would take to build a replacement would be too long to wait to save the jobs and the facility, which is regarded as crucial to the local economy.
Mr Morgan said that since the jobs at Anglesey Aluminium can only therefore be saved by having a specific and reliable energy source, the assembly government, the company, and the Department of Trade and Industry are looking at the option of building a small to medium sized power plant.