Due to the Barbarian invasions and the sacking of Western cities, civilization was under the threat of complete destruction. The establishment of monasteries as centers of culture, art, and learning made them appropriate places in which to preserve historical documents. The patrimony of the Greco-Roman Empire, theater, music, art, architecture, political thought, and philosophy were kept in the monastic archives. The Church, even in the most difficult times of invasions, always promoted learning. Many of the monasteries developed into universities which were centers of debate and research.
In the practical realm, after the fall of the Roman Empire and subsequent Barbarian invasions, it was the Church that became involved in the everyday running of civil municipalities. The Papal States came into existence, and so the pope was not only a spiritual leader but also a civil one. Road building, hospitals, prisons, and daily functions of towns came under the auspices of the church.
Even outside the Papal States, the Church was the center of every village, town, and city. Birth certificates were registered as baptismal certificates. Marriages were both civil and religious. Even deaths were registered and recorded in the funeral books of the Church. There was no death certificate as issued today by the coroner, but an official registry of baptisms, weddings, and funerals was kept in the local parish church. Education was fostered by the church as was entertainment. Religious festivals, processions, and celebrations became a way of life. They were looked forward to as a diversion from the hard work a person living in the Middle Ages had to endure. These festivals were often colorful, musical, and bountiful since food was a part of celebrations and was shared by everyone.
Diplomatically, the Church of the Middle Ages was also involved in disputes between Catholic countries, in the Crusades to provide safe passage of pilgrims to the shrines of the Holy Land, and in treaty negotiation. Treaties with the Vatican are called Concordats. The Vatican Diplomatic corps is the oldest continuously running service in the world. Even today, the Vatican City State, which is a vestige of the old Papal States, has diplomatic relations with over 125 countries. It has full diplomatic relations with an ambassador to the United States, called the Apostolic or Papal Nuncio, and has a Permanent Observer Mission of the Holy See to the United Nations. The United States (and other nations) has its own ambassador to Vatican City distinct and separate from the American Embassy in Italy.
Culturally, the Church in the Dark Ages was a beacon of light. Music, architecture, and art were given sponsorship by bishops, cardinals, and popes. Many of the great works of arts that hang in modern museums were commissioned by Catholic hierarchy. Indeed, the Vatican library and museum is a vast and important collection of Western culture.