The City of Reval was first mentioned in historical texts in 1219, although it only received city rights in 1248. After 1248, Reval became an essential city of the Livonian Order. In 1561, as a result of the Livonian War (1558-1583), Sweden took over Estonia, and gave Reval the right to mint its own coins the same year. In 1710, as a result of Russia invading the Swedish Baltics, Reval fell to the Russians, remaining under their control until Estonia's independence, starting in 1918. That same year, Reval's name was changed to Tallinn, and was declared Estonia's capital.