The Captaincy General of the Philippines was a part of Spanish colonial rule in the Philippines. It was established in 1574 and lasted until 1898. It allowed the Spanish crown to have control over the day-to-day governing of the Philippines. The Captain General, which is like a leader, was responsible for running the day-to-day activities, such as making laws and collecting taxes. The Captaincy General also had its own military which was used to protect the Philippines from outside threats. This allowed the Spanish to maintain control over the islands until they were defeated by the United States in the Spanish-American War.