Pope Francis will travel to Egypt for the first time on Friday, offering words of solidarity to the country’s beleaguered Christian community and delivering a speech to an international conference on peace.

In a video message released by the Vatican this week, he said he was coming to Cairo as a “messenger of peace”.

But at the heart of his two-day trip is a glaring contradiction, critics say.

The venue in which he will speak is accused of disseminating a rigid, medieval version of Islam that foments extremism and does nothing to foster peace and understanding between Muslims and Christians.

Al-Azhar university is a 1,000-year-old theological institution where Sunni academics pore over ancient texts and produce papers on what it means to be Muslim.

Pope Francis will meet its grand imam, Sheikh Ahmed el-Tayeb, as part of an ongoing effort by the Vatican to improve dialogue with Muslim leaders.

Although revered across the Muslim world, the university is accused of refusing to update centuries-old teachings and failing to counter militant Islamic thought that breeds extremist groups such as Islamic State, which has carried out bloody attacks on Christian churches in Egypt in the last few months.

On Palm Sunday, suicide bombers killed 45 people after targeting two churches, one in the Nile Delta city of Tanta and the other in Alexandria.

The attacks were claimed by Isil, as was an attack on police officers guarding ancient St Catherine’s Monastery in the Sinai desert a few days later.