From the late Middle Ages, Pesaro was ruled by some of the leading families of the Italian Renaissance: the Malatesta (1285-1445), the Sforza (1445-1512) and the Della Rovere (1513-1631). The Malatesta, who came from Verucchio, in the province of Rimini, commissioned important works such as the portal of the church of Saint Augustin, the restoration work in the former church of San Francis (today Sanctuary of Madonna delle Grazie) and that in the Dukes Palace, which was radically transformed during the rule of Alessandro Sforza. Founder of the Pesaro branch of the Sforza dinasty, Alessandro ruled since 1445. He wanted to adapt the Dukes Palace to the requirements of a modern Renaissance court, and therefore ordered the construction of lavish rooms, such as the majestic Metaurense Hall, where in 1465, the grand celebrations for the wedding of his son Costanzo with Camilla of Aragon took place.
Between 1478 and 1483, Costanzo Sforza built the Rocca Costanza, occupied in 1500 by Cesare Borgia, the “Valentino”.
In 1513, by order of Pope Julius 2nd, the rule over Pesaro passed down to Francesco Maria 1st della Rovere, Duke of Urbino and nephew of Julius The 2nd. During the Della Rovere rule, Pesaro was embellished with new monuments: in addition to the diamond-shaped city wall, the Dukes Palace was enlarged, Villa Imperiale was renovated and, thanks to the contribution of Guidobaldo The 2nd, the beautiful church of Saint John the Baptist was built. Lord of Pesaro until 1574, Guidobaldo left the city in the hands of his son Francesco Maria the 2nd, the last member of the Della Rovere dinasty.