The church, dedicated to the Forty Martyrs of Sebaste, was built and painted on the order of Bulgarian tsar Ivan Asen II in honour of his important victory near Klokotnitsa over the Despotate of Epirus under Theodore Ducas on 9 March 1230. The name of the church came naturally as the battle took place on the day of the feast of Holy Forty Martyrs of Sebaste. A royal church during the reign of Ivan Asen II, it was the main church of the Great Lavra monastery at the foot of Tsarevets on the left bank of the Yantra River.