It confirmed an earlier ruling handed down in November 2017 by a lower court in the northwestern city of La Coruna, in Galicia off whose coast the Prestige tanker broke in two.
Neighbouring France, which was also affected, was awarded €61 million.
The Bahama-flagged Liberian tanker went down after sailing for six days damaged and adrift, spilling 63,000 tonnes of oil into the sea and coating 2,980 kilometres (1,852 miles) of shoreline in Spain, France and Portugal with black sludge.
The spill caused huge damage to wildlife and the environment, as well as to the region's fishing industry, leading to an international cleanup effort.
The court said the final ruling on civil liability “fixes compensation at above 1.5 billion euros” to be paid by the vessel's insurance company and its skipper.
The vast majority of the compensation will go to the Spanish state. The remainder will be split between the Galician authorities and local authorities, including in French areas. Firms, particularly in the fishing industry, which was badly hit, will also receive a small cut.
The ruling ends a legal marathon after Spain's worst ecological disaster.
More than 300,000 volunteers from across Europe descended on the region to help with the clean-up.
Spain's Supreme Court in 2016 found the Prestige's Greek captain, Apostolos Mangouras, and its British insurer, The London P&I Club, as well as its owner Mare Shipping Inc, liable for the disaster.
It also sentenced Mangouras, who was 67 when the Prestige went down, to two years in jail.
The court said at the time that two major energy companies — Spain's Repsol and Britain's BP — had advised against using the Prestige tanker, a 26-year-old vessel with a carrying capacity of 81,000 tonnes.
It also cited in its ruling notes from the Prestige's former captain, Stratos Kostazos, who had complained that the tanker was in bad shape and had refused to sail in it.
Mangouras blamed the spill on the Spanish authorities which ordered the ship out to sea after it sent out a distress call due to a crack in its hull.
The total cost of the damage had been estimated by Spanish courts in 2012 at €4.1 billion, of which 3.8 billion should be given to the Spanish state.
The French government in 2013 estimated the cost of the spill for French victims stood at €109 million.