The history of Sweden can be traced back to the melting of the Northern Polar Ice Caps. From as early as 12000 BC, humans have inhabited this area. Throughout the Stone Age, between 8000 BC and 6000 BC, early inhabitants used stone-crafting methods to make tools and weapons for hunting, gathering and fishing as means of survival. Written sources about Sweden before AD 1000 are rare and short, usually written by outsiders. It was not until the 14th century that longer historical texts were produced in Sweden. It is therefore usually accepted that Swedish recorded history, in contrast with pre-history, starts around the 11th century, when sources are common enough that they can be contrasted with each other. The modern Swedish state was formed over a long period of unification and consolidation. Historians have set different standards for when it can be considered complete, resulting in dates from the 6th to 16th centuries. Some common laws were present from the second half of the 13th century. At this time, Sweden consisted of most of what is today the southern part of the country (except for Scania, Blekinge, Halland and Bohuslän), as well as parts of modern Finland. Over the following centuries, Swedish influence would expand into the North and East, even if borders were often ill-defined or nonexistent. In the late 14th century, Sweden was becoming increasingly intertwined with Denmark and Norway, with the three eventually uniting in the Kalmar Union. During the following century, a series of rebellions lessened Sweden's ties to the union, sometimes even leading to the election of a separate Swedish king. The fighting reached a climax following the Stockholm Bloodbath in 1520, a mass execution of accused heretics orchestrated by Christian II of Denmark. One of the few members of the most powerful noble families not present, Gustav Vasa, was able to raise a new rebellion and eventually was crowned King in 1523. His reign proved lasting and marked the end of Sweden's participation in the Kalmar Union. Gustav Vasa furthermore encouraged Protestant preachers, finally breaking with the papacy and establishing the Lutheran Church in Sweden, seizing Catholic Church property and wealth. During the 17th century, after winning wars against Denmark-Norway, Russia, and the Polish-Lithuanian Commonwealth, Sweden emerged as a great power by taking direct control of the Baltic region. Sweden's role in the Thirty Years' War determined the political and religious balance of power