[147] After lengthy delays, the army, led by Major General William Rufus Shafter, on June 22, landed near Santiago de Cuba.[148]  Shafter's army engaged the Spanish forces on July 2 in the Battle of San Juan Hill.[149] In an intense day-long battle, the American force was victorious, although both sides suffered heavy casualties.[150] The next day, Spain's Caribbean squadron, which had been sheltering in Santiago's harbor, broke for the open sea and was destroyed by the North Atlantic Squadron in the largest naval battle of the war.[151] Shafter laid siege to the city of Santiago, which surrendered on July 17, placing Cuba under effective American control.[152] McKinley and Miles also ordered an invasion of Puerto Rico, which met little resistance when it landed in July.[152] The distance from Spain and the destruction of the Spanish navy made resupply impossible, and the Spanish government began to look for a way to end the war.