The monastery was built in the 6th century AD as an important Byzantine pilgrimage site. It was named after the Forty Martyrs of Sebaste, which is also why it included 40 rooms, one for each of the martyrs. The legend tells that a group of Roman soldiers was asked to renounce their Christian religion in exchange for shelter. They kept loyal to their faith and refused upon which they were killed as martyrs near the city of Sebaste in Armenia.
The monastery has played an important role in the history of Saranda by giving the city its initial name, Agi Saranda, which means “Forty Saints” in Greek. Later the name was shortened by removing “Agi” and only keeping Saranda (forty).