Copenhagen (AFP) - Danish wind turbines set a new world record by generating nearly half of all the electricity consumed by the Scandinavian country in 2015, an official from state-owned Energinet.dk said Monday.

"It was much windier in 2015 than during an average year," spokeswoman Hanne Storm Edlefsen told AFP.

Wind energy production capacity had grown "a little bit, but that is not what explains the big increase," she added.

Peaking at 42.1 pecent for 2015, the number notched up from 39.1 percent of electricity consumption in 2014, when Denmark was followed by Portugal at 24 percent and then Spain at 20.4 percent, according to data from the International Energy Agency (IEA).

Denmark was on track to meet its target of generating 50 percent of its electricity from wind power by 2020, Edlefsen said.

Wind energy production had actually exceeded electricity consumption 16 percent of the time in western Denmark, where most of the country's wind turbines are located, Energinet.dk said.

"If, for some hours, we have surplus wind energy, the producers sell it to consumers in Norway, Sweden and Germany," spokesman Carsten Vittrup said in a statement.

"Conversely, we buy hydroelectric power from Norway, solar energy from Germany and power station electricity from Sweden, when it is advantageous," he added.