Austria's government on Friday announced plans to introduce a windfall tax on energy companies that will be of up to 40% for oil and gas firms.

The move implements a European Union-wide agreement for a levy of at least 33%, aimed at redistributing some of the extra income energy companies have earned thanks to soaring prices driven in large part by Russia's invasion of Ukraine.

"It is actually a war dividend," Austrian Vice Chancellor Werner Kogler of the Greens, the junior partner in the conservative-led coalition government, said of the extra profits at a news conference outlining the tax plans.

"The important thing is that we are taking a step towards greater fairness," Kogler said, adding prices paid by consumers have also soared.

For oil and gas companies, the levy of up to 40% will apply to profits that are 20% above the average of the previous four years, but companies can bring the tax rate down to 33% if they invest in renewables, the Finance Ministry said in a statement.

The tax will apply retroactively from July 1 of this year until the end of next year, it added.

A separate system will apply to power companies, kicking in when they earn 140 euros ($145) per Megawatt hour of power. The threshold can be increased to 180 euros if those companies invest in renewables, the statement said. Kogler said the tax rate then would be 90%.

That tax will apply from Dec. 1 of this year until the end of 2023, the statement said.

The levies should raise roughly two billion to four billion euros, Finance Minister Magnus Brunner told the news conference, adding that special dividends like those announced by oil and gas firm OMV and utility Verbund could not be used to reduce the amount due. ($1 = 0.9656 euros) (Reporting by Francois Murphy; Editing by Jan Harvey and Frank Jack Daniel)