To advance its ambitions to control the island and to prevent Spanish reconquest of the mainland, the Mexican government employed Commodore David Porter of the United States to command the Mexican navy in an attack on the maritime lines of Spain patrolling the island of Cuba. This was an effort to protect the Mexican territorial sea and ensure the continued success of its independence movement on all fronts. Thus began patrols of the Mexican squadron in Spanish waters, which culminated in the unsuccessful Battle of Mariel on February 10, 1828, in which Porter commanded the brig Guerrero, mounting 22 guns, and one of the finest vessels in the small Mexican Navy.