With Charlemagne's defeat and baptism of Duke Widukind in 785 during the Saxon Wars, his lands were integrated into the Frankish Empire and the Saxons were increasingly converted to Christianity. The bishoprics of Halberstadt and Hildesheim were established in eastern Saxony, bounded by the Oker river, in 804 and 815 respectively. The medieval Duchy of Saxony was divided between the districts of Eastphalia ("Ostfalahi"), Westphalia and Engern.