Pope Francis ventured into the volatile Muslim enclave of Central African Republic's capital on Monday and brought his message of reconciliation to the city's main mosque, insisting that Christians and Muslims have long lived peacefully together here and that religion can never justify violence.

The pope visited the Muslim areas of this divided capital at the end of his visit to Central African Republic.

Under heavy security, Francis crossed into the PK5 neighborhood where Bangui's Muslims have been unable to leave for months because armed Christian militia fighters have surrounded its perimeter. The pope traveled in his open-air vehicle through the neighborhood despite the security risks. Armed U.N. peacekeepers stood guard in the minarets of the mosque.

The pope's visit immediately ushered in a greater sense of freedom to the beleaguered area. In what had been a no-man's land separating the Muslim enclave from the rest of the city only the day before, thousands crossed over into the area chanting "war is over" in the local Sango language after the pope's departure. Some followed the pope's entourage all the way to the sports stadium where he said a final Mass before heading to the airport for his flight back to Italy.

Francis had insisted on coming to the PK5 neighborhood to appeal for peace in a country where two years of Christian-Muslim violence has divided the capital and forced nearly 1 million people to flee their homes. The once vibrant markets of PK5 have now been largely shuttered and many of the Muslim-owned businesses stand in ruins.

About 200 men seated inside the mosque welcomed Francis, who sat on a sofa. In comments to the chief imam, Francis insisted that Muslims and Christians are brothers and must behave as such.

"Christians and Muslims and members of traditional religions have lived peacefully for many years," he said. "Together, we say no to hatred, to vengeance and violence, especially that committed in the name of a religion or God."

The chief imam at the mosque, Tidiani Moussa Naibi, thanked Francis for his visit, which he said was "a symbol which we all understand."

Pope Francis removed his shoes, bowed his head and stood silently at the mihrab, or area of the mosque that faces the holy Muslim city of Mecca.

The pope's visit to the mosque marked the highlight of his three-nation African tour, with previous stops in Kenya and Uganda.

Central African Republic descended into conflict in 2013 when Muslim rebels overthrew the Christian president. That ushered in a brutal reign. When the rebel leader left power the following year, a swift and horrific backlash against Muslim civilians ensued.

Throughout the early months of 2014, mobs attacked Muslims in the streets, even decapitating and dismembering them and setting their corpses ablaze. Tens of thousands of Muslim civilians fled to neighboring Chad and Cameroon. Today, the capital that once had 122,000 Muslims has only around 15,000, according to Human Rights Watch.

Francis urged the international community not to view the country as doomed to a cycle of violence, saying the current conflict is a moment in time — "a painful moment, a regrettable moment, but just a moment."

"Yes, I confirm, Christians and Muslims of this country are condemned to live together and love one another," he said.

Before the fighting drove away many Muslims, Central African Republic was 37 percent Catholic and about 15 percent Muslim, with traditional faiths and Protestants making up the rest, Vatican figures show.

While the two opposing militias are identified by their religious affiliation, Muslim and Catholic leaders disavow the perpetrators of violence.

The conflict did not begin over religious ideology but rather found its roots in a bid for political power. Muslim rebels from a number of groups in the north united in a bid to oust the president of a decade, citing grievances he had failed to follow through on promises and had neglected their part of the country.

The anti-Balaka Christian militia then arose after the Muslim rebels took power and committed atrocities against Christians. As the conflict surged, the Christian militias began targeting symbols of Islam, destroying mosques and attacking civilians who wore traditional Islamic clothing. Economic resentment also fueled the violence. The Muslim community was made up of prosperous merchants. As soon as the Muslims fled, their shops were looted and destroyed. In some cases, anti-Balaka even spray-painted their names on the homes of departing Muslims to claim them.

Francis reminded the Muslims in the central mosque that the origins of the conflict weren't religious and urged them to put their own interests aside.

"We must remain united to prevent any action from either side that disfigures the face of God or has at its base the goal of defending particular interests at the expense of the common good," he said.

Later Monday, Pope Francis blessed a man who said he lost his right leg during a grenade attack by Muslim rebels. Stanislas Redepouzou, 28, said the December 2013 grenade attack also killed his mother and father.

On Monday, Redepouzou entered the stadium in his wheelchair decorated in the flags of Central African Republic and was approached by the pope as he made his way around the track inside. The crowd erupted into cheers, when he popped a wheelie and spun his wheelchair around.

"I'm ready to pardon those who harmed me," Redepouzou said. "I'm ready to reconcile with them."