|Sweden's history dates back to the 6th century. As disparate kingdoms, the peoples of Sweden participated in Viking raids that took place for hundreds of years. Though Christianity came to the region in the 9th century, it took another three hundred years for the religion to fully establish itself. For a time, the Swedish and Norwegian realms merged and in 1397, Sweden, Denmark, and Norway were united by Queen Margaret. In 1523, the Swedish aristocracy rose against the Danish and declared Swedish monarchy under Gustavus I. By 1604, Lutheranism had taken over and Catholicism was outlawed. Sweden participated in various European conflicts in the 17th and 18th centuries and it was not until 1905 that Sweden's modern borders were finally established. Long known for being politically neutral, Sweden continues to play an important role in Scandinavian and European affairs.