By 1000 AD, the invading Lombards had married local rich men and women of Italy and mixed their families together. A few rich families – part Lombard and part Roman – ruled most of northern Italy as small independent countries. Supposedly these countries were part of the Holy Roman Empire, but really they did pretty much whatever they wanted to. The biggest of these countries was Canossa, and in 1000 AD Boniface III was the Count of Canossa. Count Boniface ruled not just Canossa itself, but also many other cities of northern Italy including Florence and Pisa.
When Boniface was killed, his son Frederick inherited his country, but Frederick also died soon afterwards and left the country to his sister, Matilda, who was only eight years old. Matilda’s stepfather ruled for her. He forced Matilda to marry her stepbrother Godfrey when she was about 25 years old, but when her stepfather, mother, and husband all died soon afterwards, Matilda (now 30 years old) ruled her lands alone.
Matilda took power in the middle of a big fight between the Holy Roman Emperor, Henry, and the Pope over who should have more power. Matilda took the Pope’s side, and succeeded in fighting Henry off in several battles (though she lost some battles too). She married again about 1090 (when she was 44 years old and maybe didn’t have to worry about pregnancy anymore), to Welf V, who also supported the Pope. She continued to rule her lands, until she died of gout in 1115, when she was nearly 70 years old. When she died, many of the cities she had ruled became independent – this was the beginning of the independence of Florence, Pisa, Genoa, and many other cities in northern Italy.