The Salvadorean archbishop Óscar Romero was beatified on Saturday, the final step before sainthood, 35 years after he was shot dead at the altar by a rightwing death squad for denouncing the oppression of the poor by the military dictatorship.

Roman Catholics from around the world mixed with former Marxist rebels from El Salvador’s brutal civil war as more than 250,000 people gathered in the capital to celebrate the country priest who confronted a US-backed government.

Cardinal Angelo Amato, sent by Pope Francis, officiated the ceremony that followed decades of debate over whether Romero had rejected Church doctrine by embracing radical, leftwing rebels.

The bloodied shirt he died in was paraded through the crowd, thousands of whom had camped out since Friday. Many hoped Romero’s beatification would inspire peace in El Salvador, which has been plagued by gang violence since the war ended in 1992.

“I would take his hand and embrace him every Sunday after mass,” said 87-year-old Virginia Sánchez, once a member of Romero’s congregation. “Now we are happy, because he will pray for us and this violence we are living through.”

Romero’s path to sainthood stalled under popes John Paul II and Benedict XVI, but Pope Francis restarted the process in 2013 and declared him a martyr this year.

“Romero, who built peace with the power of love, bore witness to the faith in the extreme by offering his life,” Francis wrote in a letter published on Saturday.

President Barack Obama said in a statement he was “deeply moved” when he visited Romero’s tomb in 2011.

“Let us hope that Archbishop Romero’s vision can inspire all of us to respect the dignity of all human beings, and to work for justice and peace in our hemisphere and beyond,” Obama said.

Born in 1917 in a mountain town near Honduras, Romero apprenticed as a carpenter as a boy before entering the church, where he rose through the ranks, appearing to be a quiet conservative.

But soon after being appointed archbishop in 1977, he became a staunch critic of the military government after it began killing, kidnapping and arresting priests who had been organising peasants and supporting workers’ rights.

His sermons, often broadcast on radio, riled rightwing extremists. But he ignored multiple death threats, remaining defiant up to his murder while giving mass in the chapel of a San Salvador hospital.

“In the name of this suffering people, whose cries to heaven become more deafening each day, I beg you, I beseech you, I order you in the name of God: stop the repression,” he said in a speech to government soldiers the day before his death.

Shortly after his death, civil war broke out between the government, which had financial backing from Washington, and leftist insurgents, who are now the ruling party. The conflict claimed about 75,000 lives.

Since the conflict ended, gang violence has killed a similar number of people, with authorities recording around 15 murders a day, one of the highest murder rates in the world.