At that time the internal affairs and foreign policy of Hungary were not stable, and Batthyány faced many problems. His first and most important act was to organize the armed forces and the local governments. He insisted that the Austrian army, when in Hungary, would come under Hungarian law, and this was conceded by the Austrian Empire. He tried to repatriate conscript soldiers from Hungary. He established the Organisation of Militiamen, whose job was to ensure internal security of the country.