The Filipino rebels aided the Americans during the Spanish-American war in 1898. Emilio Aguinaldo, leader of the rebels and his men liberated several towns south of Manila and declared independence on June 12. The Americans occupied Manila when the Spanish commander surrendered. As part of the peace treaty, the United States paid $20 million to Spain and the Philippines became a territory of the United States. In retaliation, Aguinaldo gathered up his forces once more and launched another rebellion, this time against the Americans.