Colombia's President Juan Manuel Santos gestures during an interview with Reuters at the Narino Palace in Bogota, Colombia September 5, 2016. REUTERS/John Vizcaino

BOGOTA (Reuters) - Colombian President Juan Manuel Santos on Thursday acknowledged the state’s responsibility in the killing of thousands of members of a leftist political party three decades ago and pledged to prevent such assassinations again.

Santos’ statement comes less than two weeks before he will sign a peace accord with the Revolutionary Armed Forces of Colombia (FARC), whose members were killed following a previous peace agreement in the mid 1980s when they formed the Patriotic Union (UP) political party.

Some 5,000 UP members and supporters were killed by right-wing paramilitary groups, often working with state backing.

“That tragedy should never have happened, and we must recognize that the government didn’t take sufficient measures to impede and prevent the assassinations, attacks and other violations even though there was evidence the persecution was taking place,” Santos said during an event where 200 survivors and family members of UP victims were present.

As part of the latest peace agreement with the Marxist FARC rebels, the government promised to guarantee them safety once they hand in their arms. The group plans to launch a political party and stand for office.

“I make the solemn commitment before you today to take all the necessary measures and to give all the guarantees to make sure that never again in Colombia will a political organization have to face what the UP suffered,” Santos said.

On Monday, the FARC also apologized for kidnapping thousands of people to fund its half century of conflict with the government.

The two sides are gearing up to sign a peace accord to end the war, which has killed more than 220,000 people and displaced millions. Some 7,000 FARC fighters will be incorporated into society.

After the signing on Sept. 26, the deal will be put to a vote plebiscite on Oct. 2, allowing Colombians to decide whether to accept the accord.