After having been commissioned as an officer in the Imperial navy in 1852, Maximilian decided to move to Trieste where he stayed for increasingly longer and more frequent periods. He rented a villa on the slopes of the hill of "San Vito" from "Niccolò Marco Lazarovich" with a clause in the contract that allowed him to make all the modifications he considered necessary. Subsequently, during the completion of Miramare Castle, the archduke had a small castle called the Gartenhaus or "Castelletto" built which reproduced on a smaller scale the façade of the main castle and which he lived in off and on until Christmas 1860.