Scottish Power will become the first major UK energy company to generate all its electricity from wind power instead of coal and gas, after selling its final gas and hydro stations to Drax.

Power company Drax has paid £702m for the rest of Scottish Power's conventional generation business.

Scottish Power plans to invest £5.2bn over four years to more than double its renewables capacity.

Chief executive Keith Anderson said it was a "pivotal shift" for the firm.

"We are leaving carbon generation behind for a renewable future powered by cheaper green energy. We have closed coal, sold gas and built enough wind to power 1.2 million homes," he said.

Scottish Power has closed all of its coal plants in the past decade and has 2,700 megawatts (MW) of wind power capacity operating or under construction in the UK.

It also has projects planned that can generate more than 3,000 MW. Its four-year plan aims to make electricity "cleaner and cheaper for Britain".

Ignacio Galan, chairman of Scottish Power's Spanish owner, Iberdrola, said energy companies needed to be part of the solution to climate change.

"Iberdrola is acting now to cut carbon emissions 30% by 2020 and be carbon neutral by 2050. The sale of these generation assets is consistent with our strategy," he said.

Drax chief executive Will Gardiner said: "We believe there is a compelling logic in our move to add further flexible sources of power to our offering."

Drax runs the UK's biggest power plant near Selby in North Yorkshire and is moving away from coal ahead of a government deadline for an emissions limit on coal plants from 2025.

It has already converted four of its six generating units to burn wood pellets.

The Selby plant is believed to be the first bioenergy carbon capture storage (Beccs) project of its type in Europe.

The power station has previously been criticised for the levels of air pollution it produces by campaigners, who claim it produces "dangerous" levels of air pollution.

Drax said its emissions were "well within statutory limits".

In May, it announced a £400,000 pilot scheme to capture the carbon dioxide produced from burning the wood pellets.

It said that if this pilot were to lead to a full roll-out, it would achieve what it called the "holy grail" of power generation.

It planned to work with energy firm C-Capture, which is connected to the chemistry department at the University of Leeds.

Kate Blagojevic, UK head of energy at Greenpeace, said: "Big utilities across Europe have been shedding their dirty fossil fuel infrastructure because it makes economic and environmental sense. This move by Scottish Power shows that the same maths adds up in the UK too.

"Climate science could not be clearer that renewables are the future for powering our world. We need the government to give renewable energy industry its full backing rather than propping up the fossil fuel and nuclear companies."