D. The Philippines went to war with the United States in an attempt to gain its independence.
After the United States and Spain signed the Treaty of Paris in 1898, which resulted in the cession of the Philippines to the U.S., tensions arose between Filipino nationalists who sought independence and the American government. This led to the Philippine-American War, which began in 1899 and lasted until 1902. The conflict was rooted in the desire of Filipinos to gain independence after the end of Spanish colonial rule.