By May 1898, Filipino troops had cleared Cavite of Spanish forces. In late June 1898, Aguinaldo, with the help of American allies, who were now landing in Cavite, was now preparing to drive the Spaniards out of Manila. The first contingent of American troops arrived in Cavite on June 30, the second under General Francis V. Greene on July 17, and the third under General Arthur MacArthur Jr on July 30. By then, 12,000 US troops had landed in the Philippines.