As early as the eighth century AD there existed in that territory first human settlement and a small oratory or place of prayer which later became the basis of the medieval church.
With population growth in the Middle Ages and the birth of a first church dedicated to St. Michael the Archangel, of which it is confirmed in a document of the twelfth century, where it is cited as St. Michaelis de Oratory, was also developed for the country Oratoio many centuries was one of many towns located on the outskirts of the city of Pisa, close to the first road and river communication routes, characterized by an agricultural economy.