Cairo (CNN) Pope Francis sent a message of tolerance and co-existence Saturday in a Mass at a Cairo stadium before concluding his two-day trip to Egypt.

Francis' trip came nearly two weeks after the Palm Sunday bombing of two Coptic churches , which left at least 45 people dead.

Heavy security surrounded Francis as he entered Cairo's Air Defense Stadium in an open golf cart.

He waved at worshippers and stopped momentarily to bless a group of children in costume. Parts of the stadium stands were draped with his photo as well as Egyptian and Vatican flags.

"Religiosity means nothing unless it is inspired by deep faith and charity," Francis said.

"True faith is one that makes us more charitable, more merciful, more honest and more humane," he said.

"God is pleased only by a faith that is proclaimed by our lives, for the only fanaticism believers can have is that of charity! Any other fanaticism does not come from God and is not pleasing to him."

The Pope started his Mass with the "As-Salaam Alaikum," the traditional Muslim greeting in Arabic that means "Peace be upon you," and ended it with "al-Masih qam! Bi-l-haqiqa qam! (Christ is risen! He is truly risen)".

A Vatican spokesman said 15,000 people attended the Mass at the stadium, which holds 30,000.

The Pope later met with members of Egypt's small Coptic Catholic community at St. Leo's Patriarchal Seminary in Cairo's Maadi neighborhood.

In a more intimate setting than his earlier Mass, Francis urged gathered priests, nuns and worshippers to be the religious builders of peace in Egypt, saying that despite "difficult circumstances, you must endure."

"Although there are many reasons to be discouraged, and many prophets of destruction and condemnation ... may you be the sowers of hope, builders of bridges and agents of dialogue and harmony," he said.

Later Saturday, Egyptian President Abdel Fattah el-Sisi and an honor guard met the Pope at the airport in a farewell ceremony before he departed for Rome.

Tackling roots of violent extremism

On Friday, Francis stressed the importance of unity between Muslims and Christians to shape world peace.

Photos: Pope Francis visits Egypt Pope Francis visits the The Coptic Catholic College in Cairo, Egypt, on April 29. Francis made a two-day trip to Egypt to forge Muslim-Christian brotherhood and show solidarity with the country's persecuted Coptic Christian minority. Hide Caption 1 of 16 Photos: Pope Francis visits Egypt Pope Francis looks over the Nile from a terrace during a meeting with clergy and religious leaders in Cairo. Hide Caption 2 of 16 Photos: Pope Francis visits Egypt Pope Francis waves at people as he leaves after leading a mass on at a stadium in Cairo. Hide Caption 3 of 16 Photos: Pope Francis visits Egypt Pope Francis celebrates Mass at the Air Defense Stadium in Cairo on Saturday. Hide Caption 4 of 16 Photos: Pope Francis visits Egypt The April 29 Mass attracted some 15,000 worshippers to the Cairo stadium, a Vatican spokesman said. Hide Caption 5 of 16 Photos: Pope Francis visits Egypt The faithful cheer and celebrate at the April 29 Mass as Pope Francis sends a message of tolerance and co-existence. Hide Caption 6 of 16 Photos: Pope Francis visits Egypt Francis and Pope Tawadros II, head of Egypt's Coptic Orthodox Church, sign a joint declaration reiterating the fraternity between their churches at Cairo's St. Mark's Cathedral. "Let us intensify our unceasing prayer for all Christians in Egypt and throughout the whole world, and especially in the Middle East," the declaration said on Friday, April 28. Hide Caption 7 of 16 Photos: Pope Francis visits Egypt The Pope greets Sheikh Ahmed el-Tayeb, the grand imam of the Al-Azhar mosque in Cairo, on April 28. Hide Caption 8 of 16 Photos: Pope Francis visits Egypt Pope Francis addresses a peace conference at Al-Azhar, a prestigious institute of Islamic learning in the Sunni Muslim world. Francis stressed the importance of Muslim-Christian unity to shape world peace, and he emphasized the "incompatibility of violence and faith." Hide Caption 9 of 16 Photos: Pope Francis visits Egypt Muslim scholars wait for the peace conference to begin. Hide Caption 10 of 16 Photos: Pope Francis visits Egypt The Pope arrives for his meeting with the Grand Imam. Hide Caption 11 of 16 Photos: Pope Francis visits Egypt An Egyptian army vehicle is stationed outside of St. Mark's Cathedral in central Cairo. The Pope's visit comes nearly three weeks after the Palm Sunday bombing of two Coptic churches, brazen strikes that left at least 45 people dead. Hide Caption 12 of 16 Photos: Pope Francis visits Egypt Pope Francis disembarks from his plane after arriving in Cairo. Hide Caption 13 of 16 Photos: Pope Francis visits Egypt A billboard features Pope Francis above a Cairo street. Hide Caption 14 of 16 Photos: Pope Francis visits Egypt The Pope greets journalists on the airplane en route to Egypt. Hide Caption 15 of 16 Photos: Pope Francis visits Egypt Francis shakes hands with Alitalia crew members before departing Rome on April 28. Hide Caption 16 of 16

"Let us say once more a firm and clear 'No!' to every form of violence, vengeance and hatred carried out in the name of religion or in the name of God," he said in Italian in a speech at a peace conference at Al-Azhar University, the premier seat of high learning among Sunni Muslims.

Francis met with Sheikh Ahmed el-Tayeb and became the first pontiff to visit the institution since Pope John Paul II in 2000.

The two religious leaders spoke at the closing of the International Conference for Peace, organized by Al-Azhar. Greeting the grand imam, Francis called him "my brother" and sat by his side at the conference.

The Pope took on a familiar theme: the roots of violent extremism.

Eliminating poverty and exploitation

Francis opened his speech with "As-Salaam Alaikum" after the imam's address.

"In order to prevent conflicts and build peace, it is essential that we spare no effort in eliminating situations of poverty and exploitation where extremism more easily takes root, and in blocking the flow of money and weapons destined to those who provoke violence," he said.

Francis called for an end to the "proliferation of arms" and lambasted "demagogic forms of populism."

"If they are produced and sold, sooner or later they will be used," he said. "Only by bringing into the light of day the murky maneuverings that feed the cancer of war can its real causes be prevented. National leaders, institutions and the media are obliged to undertake this urgent and grave task."

Tayeb addressed the status of faith in modern life.

"With all these accomplishments (of the 21st century), how come peace has become a lost paradise? The answer, I assume, is that modern civilization has ignored religion," he said.

After the peace conference, Francis and the Egyptian President addressed religious and political dignitaries at Al-Masa Hotel.

The Pope, again speaking in Italian, focused on Egypt's role in fighting terrorism, evoking events from biblical and modern history. He ceremonially greeted all Egyptian people, including minority Christians -- Coptic Orthodox, Greek Byzantines, Armenian Orthodox, Protestants and Catholics.

12-point declaration

Pope Tawadros II, head of Egypt's Coptic Orthodox Church, then greeted Francis at St. Mark's Coptic Orthodox Cathedral in Cairo's Abbassiya district, state TV said. They walked together in procession and took part in ecumenical prayers at the adjacent church of St. Peter, the site of a deadly blast in December that left at least 23 people dead.

Francis commended the efforts of Tawadros II, whom he called a brother, in organizing meetings between the Coptic Orthodox and Catholic churches.

Francis and Tawadros II signed a joint, 12-point declaration reiterating the fraternity between their churches. "Let us intensify our unceasing prayer for all Christians in Egypt and throughout the whole world, and especially in the Middle East," the declaration says.