Instituted by Pope St. Pius V to give thanks for their victory at the battle of Lepanto in the 1570s. They attributed their victory to the rosary and the feast actually is a reminder of all the countless blessing bestowed upon the people through the Rosary of our Blessed Virgin Mary.
It was initially a practice developed as an imitation of 150 Psalms, by praying 150 our Fathers. There was also a practice of praying 150 Hail Marys. Then at some point, the mystery of the life of Jesus was added to each of the Hail Mary. According to legend, Mary gave the rosary to Saint Dominic. Although a legend, the development of the prayer form of the rosary can be attributed to the followers of Saint Dominic. One of the followers was even known as the “apostle of the rosary”, Alan de la Roche. He was the one who founded the first Confraternity of the Rosary. By 16th century, the rosary has already transformed into the form that we now use.