The Short Version
The historical record shows that Spain ceded the Philippines to the United States in the 1898 Treaty of Paris, which ended the Spanish-American War. In that standard legal and political sense, the United States gained control after the war. The important caveat is that U.S. authority was immediately contested, leading to the Philippine-American War.