In 1091, the Pechenegs invaded the Byzantine Empire and were crushingly defeated by John II's father Alexios I Komnenos (r. 1081–1118) at the Battle of Levounion. This defeat had meant the elimination of the Pechenegs who had taken part in the expedition as an independent force, as the male survivors were enrolled in the Byzantine army; however, some Pecheneg groups had not been involved in the invasion.