Military and diplomatic career
Pietro's relationship with his older brothers was complicated. Francesco I, wishing to rid himself of Pietro's presence at the grand ducal court, decided to send him to the Kingdom of Spain. In 1577, he sent his personal secretary, Antonio Serguidi, to Madrid to inform Philip II in detail about the reasons for the murder of the Grand Duke's daughter-in-law and asked the monarch to take Pietro under his personal protection. The king gave his consent, and in 1578 Pietro departed for the court in Madrid, where he arrived on April 17 of that year and remained until November. The Kingdom of Spain was interested in closer cooperation with the Grand Duchy of Tuscany. In Madrid, the prince served as the official representative of Florence. On April 14, 1578, Pietro was invited to the christening of King Philip II's newborn son, the future Philip III of Spain.
In 1579, Pietro returned to Tuscany. Soon, Francesco I sent him back to Spain, placing him as a general in charge of a detachment of infantry, which he sent to Philip II along with a substantial loan. This time, Pietro was accompanied by Colonel Luigi Dovara, who instructed him on how to conduct himself at the court in Madrid to avoid incidents. A year later, as a lieutenant in the same infantry, the prince participated in the occupation of the Kingdom of Portugal under the command of Fernando Álvarez de Toledo, 3rd Duke of Alba. He remained in Lisbon until the end of 1582, then returned to Madrid. During his service in Spain, the king granted him the title of Don.
In 1584, Pietro departed for Florence with the rank of permanent general of the infantry. In April 1585, he was sent to Rome as ambassador to the new Pope, Sixtus V. From Rome, he went back to Madrid, but in 1588 he returned to Florence for the coronation of his other other brother, now Grand Duke Ferdinando I de' Medici. That same year, he became the first patron of the Accademia della Crusca in Florence. Pietro led the embassy sent by the Grand Duke to his fiancée, Princess Christina of Lorraine. In April 1589, a small fleet under his command brought the princess from Marseille to Livorno. However, relations between him and Ferdinando soon deteriorated again. The cause was Pietro's lifestyle, his passion for gambling and extravagance, which resulted in large debts. The brothers could not agree on the division of their father's inheritance, and, despite the Grand Duke's prohibition, Pietro left for Madrid.
In the dispute over the inheritance, Pietro turned for support first to King Philip II, then to Pope Clement VIII, and finally to the new Spanish King Philip III. While Philip II attempted to exert pressure on the foreign policy of the Grand Duke of Tuscany through the prince, during the reign of Philip III, relations between the two states became stable, and the court in Madrid lost interest in the inheritance dispute. In 1596, through the mediation of Clement VIII, the Grand Duke agreed to pay his younger brother a monthly allowance of 1,000 scudi. Ferdinando I subsequently paid Pietro's debts on numerous occasions. The last conflict between the brothers over this issue occurred in 1602.