In 337, Emperor Constantine I, who had legalised and promoted the practice of Christianity in the Roman Empire, died. Seizing on this opportunity, Shapur II of Persia began a series of attacks into Roman North Mesopotamia. Nisibis was besieged in 338, 346 and 350. During the first siege, Ephrem credits Bishop Jacob as defending the city with his prayers. In the third siege, of 350, Shapur rerouted the River Mygdonius to undermine the walls of Nisibis. The Nisibenes quickly repaired the walls while the Persian elephant cavalry became bogged down in the wet ground. Ephrem celebrated what he saw as the miraculous salvation of the city in a hymn that portrayed Nisibis as being like Noah's Ark, floating to safety on the flood.