Belgium gained its independence from the United Netherlands in 1830 and was established as a popular and constitutional monarchy under a bicameral parliamentary democracy. A liberal Constitution was written in 1831 which codified the responsibilities and restrictions imposed on the monarch. Although the King, as head of state, was prevented from acting without the approval of a government minister, he was allowed full control of military matters in his capacity as Commander-in-Chief.