The Duchy of San Martino was within that part of the world Sarah Jane Smith recognised as Italy. She and the Fourth Doctor went there in 1492. After the death of his father, Giuliano became Duke of San Martino, surviving a power grab by the next person in the order of succession — his uncle, Count Federico. (TV: The Masque of Mandragora)
Among the various visits made by the Doctor across the globe in the past, San Martino was noted by Jac as UNIT in the 2010s compiled a list of his appearances in order to deduce where the Twelfth Doctor had gone for his final destination. (TV: The Magician's Apprentice)
Behind the scenes
San Martino is a popular Italian place name, but it does not name any actual, historic duchy of Italy.