The Šentrupert microregion covers an area of 29 km2 and is the central part of the basin drained by the Mirna, a tributary of the Sava in Central Dolenjska. It lies at the point of transition from the Mirna-Mokronog Basin to the hills to the north, and stretches as far as the boundary with the mountainous area that may be considered the start of the pre-Alpine Posavje Hills. Since inverse settlement, i.e. settlement on ridges, hilltops and terraces, prevails in the hinterland, the valleys are not a connecting element but a separating element. Šentrupert lies in the central, broadest, most spacious part of the Mirna-Mokronog Basin. The basin cuts deepest into the hills along the course of the Bistrica, the largest tributary of the Mirna, and is up to 5 kilometres wide at that point. Its terraced northern margin not only has a favourable exposure, it also has the greatest quantity of land suitable for settlement and cultivation in the entire valley of the Mirna.
The landscape of the Šentrupert microregion is extremely varied, since it lies at the junction of various landforms and rock masses. Owing to the diversity of bedrock and slopes, soil types also change rapidly. Within the microregion, four smaller natural units may be distinguished: the damp basin floor, the terraced edge of the basin, a hilly hinterland and a mountainous area. The terraced basin edge, where arable land and settlements predominate, is the economically most important part of the region. The lowest sections along the streams are grass-covered, while forest only occupies a small percentage of the land. The predominate land use in the hills is forest, followed by vineyards. Orchards are relatively few.
The mountainous spurs of the Posavje Hills, crossed by the rivers Bistrica and Mirna with their tributaries the Sotla, the Busenk and the Jesenčica, are passable towards the east via the gentle slopes of the hills and by way of the roads on the plain. The valley is closed in the north by the slopes of Kremen and Kamnje, and in the west by the slopes of Oplenk. The area is more open towards the south-east, where it seeks a connection with Mokronog, and on down the valley of the river Laknica with the Ljubljana–Novo Mesto road. Towards the south-west it connects with Trebnje and the Novo Mesto–Ljubljana road, while in the north-east and north-west the valley is closed and less easily passable, e.g. via Brunk to Radeče. A favourable climate has resulted in good living conditions and relatively dense settlement since prehistoric times.
The Early Middle Ages is common to all European nations and marked by the period known as the Völkerwanderung or Migration of Peoples. In this historical tumult, and following the collapse of the Roman Empire, intensive settlement continued until the end of the sixth century and even into the early seventh century. An important focus of settlement for Slovenes was the area of the foothills north and south of the Alps. Settlement here was concentrated in and around the Klagenfurt Basin, with its centre on the Zollfeld plain (Gosposvetsko polje in Slovene), and its influence was also felt in our part of the world.
After subjugation by the Franks, the Slovenes were politically annexed to the West, which began to introduce Christianity to Carantania, now part of the Frankish Empire. Local princes continued to rule up until the failed rebellion of Ljudevit Posavski in 823. From then on the Franks installed German counts, who brought with them their own civilisation, which above all meant a more developed social order and economy. The greatest loss felt by Slovenes at that time was the equality that had been a characteristic of the Old Slavonic culture. There were also endless uprisings and quarrels among the German princes and margraves for authority over the principality. Its great wealth consisted of fertile river plains, forests and, in some areas, inexhaustible supplies of precious metals.
In the 9th century we encounter, besides the German nobility, an increasing number of Slovene noble families – descended from the old Slavonic nobility – in positions of power. For Slovenes in general, the most important Carantanian margrave was without a doubt Arnulf of Carinthia, king of East Francia from 887 and Holy Roman Emperor from 896. He granted Gurk in Carinthia to the Slovene nobleman Svetopolk. This was confirmed by his son Ludwig, and this property was joined by other estates in Carinthia, Styria and Carniola, among them Šentrupert. At the same time Waltun was endowed with property: in Carinthia he was given estates in the Trixen Valley and in Diex, in Lower Styria he received Vitanje and Reichenburg and, in Carniola, he took possession of the Krško (Gurkfeld) estate.
Thanks to a tolerant policy, both these noble families survived despite the pressure of German immigrants: in their territories they conserved the Slovene language and their own social customs. They introduced a more progressive manorial economy and led the province into flourishing social prosperity. From the point of view of dynastic policy, through the marriage of their offspring Hemma and Wilhelm they combined their great possessions into a joint dynastic hereditary territory covering the whole of present-day Slovene ethnic territory, part of which is today united in the state of Slovenia. The Friesach-Zeltschach dynasty had their seat at Gurk in Carinthia, and at Zeltschach, where there were also rich gold and silver mines. The enormous estates, combined into what for that time was an unusual geographical whole, political affiliation to the emperor and good management took the family to the forefront of the then-flourishing nobility of the Holy Roman Empire. The upper river basin of the Mirna also belonged to this family, and their seat in the area was somewhere in the environs of Šentrupert. Rich historical testimonies, the developmental tendencies of the medieval economy which are still visible today, and a rich cultural heritage are the fruit of the political and social action of this family.
Owing to their loyalty to the imperial crown, this dynasty was outwardly politically powerful, a consequence of which was the constant rewarding of the margraviate's successes in the field of "security"; inwardly, however, it was eaten away by the fierce opposition of the ruling dukes, which eventually cost it its existence. Most notable among the last representatives of this family is the Countess Hemma, the wife of Wilhelm I, to whom history ascribes a decisive role in the conservation of Sloveneness in view of her legendary life and her deep rootedness in Slovene national consciousness.
After the Friesach-Zeltschach dynasty died out, the government of the Savinja March passed to the Counts of Plain (Grafen von Plain), Hemma's descendants from a collateral branch. They concentrated their political power in Lower Styria, above all in the Savinja Valley. Their seat was at Sovnek (Sannegg) Castle and they initially called themselves the Counts of Sovnek. Later, when they had moved their seat to the town of Celje, they became known as the Counts of Cilli (Celje). The Carniolan branch of the Plain family continued the tradition under the name of the Counts of Višnja Gora, where they concentrated their power on Višnja Gora Castle, and later also at Šumberk and Mirna.
In 1044 Hemma founded a Benedictine convent at Gurk in Carinthia and granted it, among other estates, Škrljevo Castle and the surrounding area. Archbishop Gebhard of Salzburg, however, abolished the Benedictine convent and founded the Diocese of Gurk on its territory; and thus the bishops of Gurk were also masters of Hemma's former estates in the Mirna Valley. In 1335 the lords of Sovnek and the owners of Mirna Castle became the Counts of Cilli, and in 1393 they obtained the right of patronage over the parish of Šentrupert, thus establishing themselves on the Carniolan side of the former Savinja March. In the first half of the 15th century they played an important role in the valley, particularly in the defence against the Turks and the consolidation of political power against the Duke of Austria, Frederick of Habsburg. Important for us in this period is the construction of defences against the Turks, which in Šentrupert enabled the construction of one of the most beautiful Gothic churches in Slovenia in this period.
The Auersperger family were also powerful in Šentrupert. They had come to Slovenia with Charlemagne and by AD 955 certainly already resided at Turjak Castle. By 1265 they are also mentioned in the Šentrupert district. In the early 15th century they settled in Rakovnik Castle. From then on their possessions in the area continued to increase, multiplying in particular after the Counts of Cilli died out. The last powerful member of this family was Jacob Auersperger, parish priest of Šentrupert. Thanks to his political and economic power, he succeeded in transferring the parish seat under the aegis of the Novo Mesto collegiate chapter, which he founded. This was quite an achievement for those times, and one that benefitted the whole of Lower Carniola (today's Dolenjska), although it did irreparable damage to the Šentrupert area. The heirs of Jacob Auersperger continued to strive to share the prosperity of the parish of Šentrupert with the Novo Mesto collegiate chapter. As a result of this, the provosts of Novo Mesto became entangled in lengthy lawsuits.
The founding of the Novo Mesto collegiate chapter had a profound effect on the subsequent economic and political development of the Šentrupert area. It was founded in 1493 at the initiative of the then parish priest of Šentrupert and archdeacon of Lower Carniola, Jacob Auersperger. For the basis of its operations it received from the ecclesiastical and civil authorities the parishes of Šentrupert, Mirna Peč and Ponikve in Styria and some benefices in the Novo Mesto area. Crucial for Šentrupert was the fact that this foundation cut the economic veins of the Mirna Valley, which from that moment on began to languish economically. In political terms, the parish of Šentrupert was, until the founding of the collegiate chapter, the westernmost outpost of the authority of the Patriarch of Aquileia. Economic currents were directed towards this outpost from Venice, via Aquileia, Trieste, Ljubljana towards the south-eastern Balkans. Following the founding of the collegiate chapter, this flow was directed towards Novo Mesto and on down the valley of the Krka. The Novo Mesto collegiate chapter thus consolidated the authority of the Habsburg dynasty in Carniola against that of the Patriarch of Aquileia and the Venetian Republic, while the power of the provincial seigneurs was also curtailed. The economic surplus of the parish thus flowed off to Novo Mesto in order to maintain the capitular canons. This is confirmed by the numerous disputes between the capitular clergy and the parish priests of Šentrupert, who later were not members of the chapter. Only one provost, Giorgio Francesco Saverio de Marotti, provost of Novo Mesto from 1715 to 1740, intervened significantly in the conditions of the Šentrupert parish by building a pilgrim church in honour of his patron saint Francis Xavier at Vesela Gora, which drew numerous pilgrims from all the surrounding towns. This signalled the start of a new economic upturn throughout the valley.