Under the Constitution of the Philippines, the president of the Philippines () is both the head of state and government, and serves as the commander-in-chief of the country's armed forces. The president is directly elected by qualified voters to a six-year term and must be "a natural-born citizen of the Philippines, a registered voter, able to read and write, at least forty years of age on the day of the election, and a resident of the Philippines for at least ten years immediately preceding such election". Any person who has served as president for more than six years is barred from eligibility. Upon resignation, or removal from office, the vice president assumes the post. History Emilio Aguinaldo became the inaugural president of the Philippines under the Malolos Republic, considered the First Philippine Republic. He held that office until 1901 when he was captured by United States forces during the Philippine–American War (1899–1902). The American colonization of the Philippines abolished the First Republic, which led to an American governor-general exercising executive power. In 1935, the United States, pursuant to its promise of full Philippine sovereignty, established the Commonwealth of the Philippines following the ratification of the 1935 Constitution, which also restored the presidency. The first national presidential election was held, and Manuel L. Quezon (1935–44) was elected to a six-year term, with no provision for re-election, as the second Philippine president and the first Commonwealth president. In 1940, however, the Constitution was amended to allow re-election but shortened the term to four years. A change in government occurred three years later when the Second Philippine Republic was organized with the enactment of the 1943 Constitution, which Japan imposed after it occupied the Philippines in 1942 during World WarII. José P. Laurel acted as puppet president of the new Japanese-sponsored government; his de facto presidency, not legally recognized until the 1960s, overlapped with that of the president of the Commonwealth, which went into exile. The Second Republic was dissolved after Japan surrendered to the Allies in 1945; the Commonwealth was restored in the Philippines in the same year with Sergio Osmeña (1944–46) as president. Manuel Roxas (1946–1948) followed Osmeña when he won the first post-war election in 1946. He became the first president of the independent Philippines when the Commonwealth ended on July4 of that year. The Third Republic was ushered in and would cover the administrations of the next five presidents,