Pope Francis has praised two of the towering figures of the 20th-century Catholic Church as prophets who shunned wealth and looked out for the poor as he canonised Pope Paul VI and martyred Salvadoran Archbishop Oscar Romero.

Francis declared the two men saints at a Mass in St Peter’s Square before tens of thousands of pilgrims, a handful of presidents and some 5,000 Salvadoran pilgrims.

Tens of thousands more Salvadorans stayed up all night at home to watch it on giant TV screens outside the San Salvador cathedral where Archbishop Romero’s remains are entombed.

Vatican Saints
A view of St Peter’s Square during a canonisation ceremony (Andrew Medichini/AP)

In a sign of the strong influence Paul and the archbishop had on history’s first Latin American pope, Francis wore the blood-stained rope belt that Archbishop Romero wore when he was gunned down in 1980 and also used Paul’s staff, chalice and pallium vestment.

Paul presided over the modernising yet polarising church reforms of the 1960s, while Archbishop Romero was murdered by El Salvador’s right-wing death squads for his fearless defence of the poor.

In his homily, Francis called Paul a “prophet of a church turned outwards” to care for the faraway poor.

He said Archbishop Romero gave up his security and life to “be close to the poor and his people”.

And he warned that those who do not follow their example to leave behind everything, including their wealth, risk never truly finding God.

“Wealth is dangerous and — says Jesus — even makes one’s salvation difficult,” Francis said.

“The love of money is the root of all evils,” he said. “We see this where money is at the centre, there is no room for God or for man.”

Vatican Saints
Priests wearing vestments with the effigy of martyred Salvadoran Archbishop Oscar Romero attend the canonisation ceremony (Andrew Medichini/AP)

For many in San Salvador, it was the culmination of a fraught and politicised campaign to have the church formally honour a man who publicly denounced the repression by El Salvador’s military dictatorship at the start of the country’s 1980-1992 civil war.

“I am here to give glory to Monsignor Romero,” said Aida Guzman, a 68-year-old Salvadoran woman who carried photos of people killed during the war as she joined thousands in a Friday evening procession in San Salvador.

“He is a light for our people, an inspiration for all.”

Mr Romero, the archbishop of San Salvador, was murdered as he celebrated Mass on March 24, 1980, in a hospital chapel.

A day before he was killed, he had delivered the latest in a series of sermons demanding an end to the army’s repression — sermons that had enraged El Salvador’s leaders.

Almost immediately after his death, Archbishop Romero became an icon of the South American left and is frequently listed along with Martin Luther King Jr and Gandhi as one of the world’s most influential human rights campaigners.

The United Nations commemorates the anniversary of his death each year.

But his popularity with the left led to a decades-long delay in his saint-making cause at the Vatican, where right-wing cardinals led by Colombian Cardinal Alfonso Lopez Trujillo warned his elevation would embolden Marxist revolutionaries on the continent.

Eventually Pope Benedict XVI unblocked the cause and Francis saw it through to its conclusion Sunday, including his determination that Archbishop Romero was a martyr for the church — killed out of hatred for the faith and for preaching the Gospel, even though his assassins were Catholics like him.

Archbishop Romero’s influence continues to resonate with El Salvador’s youth as the country endures brutal gang violence that has made the Central American nation one of the most violent in the world.