According to the mosque, it was something that several visitors wished for.
"Such a prayer was held in thousands of mosques all over the world and does not mean that those who held the prayer support Hamas or any other political movement", writes the Gothenburg Mosque on Tuesday in a statement.
"The decision was made by the imam at the request of some visitors and does not reflect the mosque's official stance", it further states in the statement.
Imam Ahmed Ghanem tells Doku that it is a tradition to pray for well-known Muslim leaders. He emphasizes that the prayer concerned the Hamas leader as a civil leader.
Ismail Haniya was an elected leader and it's their business, it doesn't concern me at all, says Ahmed Ghanem to Doku.
Social Minister Jacob Forssmed (KD) has reacted to the incident.
"Recently, we could take part in extremely disturbing information about a prayer in the Gothenburg Mosque. Extremism has no place in religious environments", he writes on X, which GP was the first to report.