In June 1585 Pedro was appointed captain general of the galleys of the Kingdom of Naples and fought the Ottoman corsairs in the Mediterranean Sea. On 14 July 1607, Philip II entrusted him with command of all the galleys of Spain. In 1608, he was sent to Paris as Ambassador extraordinary to France to seal a pact with King Henry IV of France, which failed.
The expulsion of the Spanish moriscos since 1610 increased the Ottoman naval attacks in the West Mediterranean, especially when young Ahmed I became Sultan. Pedro Alvarez set up an extensive defensive engineering program, with Italian engineers working in Italy, Spain and the Caribbean in America.
After this, he was Commander in chief of an army in Naples, General of Cavalry of Spain in 1621. His success in Milan was awarded with the honorable Grandeza de España title in 1623. In 1625 he participated in the successful Defense of Cadiz against the attacks from the Anglo-Dutch fleet under the command of Sir Edward Cecil.[1]