after the deaths of both darth vader and the emperor and the empire's loss on the battle of jakku, the empire surrendered to the rebel alliance. the rebels then created the new republic. the empire may have surrendered, but some of the empire's leaders who were still alive created a new military based on the empire, the first order. they rebuilt by buying weapons and spaceships from greedy merchants in the outer rim and taking over planets with many resources they could use to buy more weapons. they also kidnapped many babies and forced them to become stormtroopers. they secretly built a superweapon called starkiller base. they used the weapon to blow up the capital of the new republic, hosnian prime.