From the 9th to the 11th centuries, coastal Balts were subjected to raids by the Vikings, and the kings of Denmark collected tribute at times. During the 10–11th centuries, Lithuanian territories were among the lands paying tribute to Kievan Rus', and Yaroslav the Wise was among the Ruthenian rulers who invaded Lithuania (from 1040). From the mid-12th century, it was the Lithuanians who were invading Ruthenian territories. In 1183, Polotsk and Pskov were ravaged, and even the distant and powerful Novgorod Republic was repeatedly threatened by the excursions from the emerging Lithuanian war machine toward the end of the 12th century.