The Philippines gained independence on July 4,1946, due to the signing of the Treaty of Manila with the United States, who had annexed the Philippines as a territory in 1898. While at first the U.S. intended for the Philippines to be a colonial property, conflicts in the Philippines caused the U.S. to become more inclined toward Philippine independence.
Philippine independence had been sought since the mid-19th century. During the 1898 Spanish-American war, Emilio Aguinaldo led a band of rebels to oust the Spanish rulers. Though Aguinaldo declared Philippine independence, the island nation was formally annexed by the United States in the peace treaty that ended that war.
At first, the United States wanted to maintain the Philippines as a colonial territory, but the fractious Filipinos rebelled, drifting from a conventional war to a guerrilla conflict in which they had the advantage. In 1900, the U.S. established the "policy of attraction," a campaign intended to win hearts and minds by allowing the Philippines a large degree of self-government.
America's 1916 Jones Act promised eventual Philippine independence, and in 1935, the island nation became an independent commonwealth. The Japanese attacks during World War II interrupted the move toward independence, which was finally granted after the war. Even after Philippine independence, the United States extended a special relationship to them, providing extensive military and financial assistance while maintaining multiple military bases on Philippine territory.