Pope Francis on Saturday honored the Ugandan Christians who were burnt alive rather than renounce their faith a century ago, urging today's Catholics to follow in their missionary zeal and spread the faith at home and abroad.

A somber Francis prayed at shrines dedicated to the 23 Anglican and 22 Catholic martyrs who were killed between 1885 and 1887 on the orders of a local king eager to thwart the influence of Christianity in his central Ugandan kingdom. According to historians, the Christians were also killed because they refused the king's sexual advances, citing the church's opposition to homosexuality.

At Namugongo, outside the capital, Kampala, where most of the martyrs were burned alive, Francis prayed first at the gruesome sanctuary dedicated to the Anglicans, kneeling before part of the same tree where they were tortured before being executed. He then prayed at the Catholic shrine and celebrated Mass in their honor to mark the 50th anniversary of the Catholics' canonization.

As many as 2 million people were expected to attend the Mass, including Ugandan President Yoweri Museveni, the president of South Sudan and the descendant of the king who ordered the deaths.

Francis urged them to use the martyrs' example of faith to be missionaries at home by taking care of "the elderly, the poor, the widowed and the abandoned."

"This legacy is not served by an occasional remembrance or by being enshrined in a museum as a precious jewel," he said. "Rather we honor them and all the saints when we carry on their witness to Christ, in our homes and neighborhoods, in our workplaces and civil society, whether we never leave our homes or we go to the farthest corner of the world."

The Argentine pope knows of what he speaks. When he joined the Jesuit order as a young man, he longed to be a missionary in Japan. But his superior told him to stay home for health reasons, and he later developed a ministry in the slums of Buenos Aires that has formed the basis of his papacy.

During his two days in Uganda, Francis is expected to touch on some of the same themes he emphasized during the first leg of his trip in Kenya: corruption, poverty and giving young Christians hope and encouragement. After the Mass on Saturday, Francis has a rally with young people, a visit to a charity and a meeting with local priests, seminarians and nuns on his agenda.

Some of the pilgrims attending the Mass had been here all night to honor the martyrs and see the pope, braving rains and sleeping on mats to guard against the mud that turned the grounds into chocolate-colored muck.

"They are so important because they sacrificed their life because of their religion," said Beneh Ssanyu, 27, who showed off the mud encrusting her sandals and pants _ evidence of her 1 p.m. Friday arrival that scored her a prime front-row seat.

Security at the shrine was tight, with those entering the main area passing through metal detectors and police boats monitoring the moat surrounding the altar where Francis celebrated the service.

Francis has made a point on his foreign travels to honor local martyrs in hopes of inspiring a new generation of missionaries. When he was in South Korea, for example, he beatified 124 missionaries who helped bring the faith to the Korean Peninsula. He has also spoken out frequently about today's martyrs, the Christians in the Middle East and Africa who have been slaughtered by Muslim militants.

The history of Uganda's martyrs has helped shape the Catholic Church here, with huge numbers of pilgrims flocking to the Namugongo shrine, many of them Africans arriving from as far away as Congo and Tanzania. Most of the pilgrims walk long distances to the site to underscore their faith.

King Mwanga II of Buganda Kingdom ordered the martyrs killed during a period of political and religious turmoil as he tried to assert his authority amid the growing influence of missionaries from Europe.

But the history of the martyrs also shows a personal grudge Mwanga held against them: After the martyrs converted to Christianity, they began rebuffing his sexual advances since church teaching forbid homosexuality _ a humiliation that was part of the reason they were ordered killed, according to the history of the slaughter, "African Holocaust" by J.F. Faupel.

"It is absolutely true. It is a fact," said Bishop Giuseppe Franzelli, a longtime Italian missionary in Uganda. "When they became Christians, they saw that this was not according to the Gospel, the teaching of Christ and they said no."

The little-known history might help explain why homosexuality remains so taboo today in Uganda, which is 47 percent Catholic and has criminalized homosexuality.

The Vatican has refused to say whether Francis will discuss gay rights openly while here.

On Sunday, Francis heads to his final destination, the Central African Republic.