BOGOTA (Reuters) - Colombia's next three governments must comply with a 2016 peace deal signed with the Marxist FARC rebel group, the Constitutional Court said in a ruling late on Wednesday, shielding the accord from potential changes should the opposition win next year's elections.

The decision blocks modifications to the peace deal for the next 12, stymieing right-wing opponents of President Juan Manuel Santos who have long rejected the accord and who may have sought to change or cancel it.

The deal with the Revolutionary Armed Forces of Colombia (FARC) rebels ended more than 52 years of war. More than 220,000 people have died and millions have been displaced during the Andean country's conflict between the government, leftist guerrillas and right-wing paramilitaries.

"Institutions and authorities of the state have the obligation to comply with what is established in the final accord in good faith...until the end of three complete presidential periods following the signing," reads the constitutional reform approved by the court.

The government welcomed the ruling, with peace commissioner Rodrigo Rivera saying in a statement that the ruling should ease any worries among former FARC combatants, some 7,000 of whom have demobilized and formed a political party, that the accord will not be respected.

Right-wing opposition politicians, including ex-president turned senator Alvaro Uribe, said the ruling ignored the will of Colombians, who narrowly rejected the deal in a referendum held just over a year ago, before it was modified and passed through Congress.

(Reporting by Luis Jaime Acosta; Writing by Julia Symmes Cobb; Editing by Michael Perry)