The Sontarans and the Rutans of Ruta 3 have been at war for millennia (The Time Warrior, Horror of Fang Rock). In the 12th century, Earth was of no strategic significance, although in The Time Warrior Linx is on a reconnaissance mission. Linx regards the war as a 'struggle for freedom'. The Sontarans already have primitive time technology, and are aware of Gallifrey.
Over the subsequent centuries the Rutans dominated the whole of the Milky Way (Horror of Fang Rock), probably ignoring Earth as being too primitive and Gallifrey (see Terror of the Autons) as too advanced. By the early twentieth century, however, the Sontarans had fought back, and Earth was on the front line. Less than 100 years later, with the war raging in the Madillon Cluster, the Sontarans became worried that the Third Zone governments might ally themselves with the Rutans (The Two Doctors). They resumed their time travel experiments, but still could not develop fully functioning time travel craft.
By around the year 13000 the Milky Way once again assumed a strategic importance in the Sontaran/Rutan war (The Sontaran Experiment). Despite Linx's words (that they lack the 'morale to face a determined assault'), the Sontaran invasion of Gallifrey (The Invasion of Time) was not a great success.