The Habsburg dynasty ruled as emperors of Austria over the western and northern half of the country and as kings of Hungary over the Kingdom of Hungary. The Kingdom of Hungary had some ability to govern itself. It also had a say in things that affected both it and the rest of the empire. This was mainly foreign relations and defense.