The first mention of Lokrum in writing came in 1023, in connection with the founding of the Benedictine abbey and monastery. According to legend Richard the Lion-Heart was cast ashore here after being shipwrecked in 1192 while returning from the Crusades. The vow he made to build a church on the spot where he came ashore should he be saved was kept at least in part. Although he came ashore in Lokrum, at the request of the people of Dubrovnik, he agreed to have the church built in the city itself.