The Dominators launched an ultimately failed unsuccessful invasion of Gallifrey by flooding the Capitol with Quarks, 39 of which were destroyed by Leela and K9 Mark I. Though the Fifth Doctor would claim that there was never "any serious risk of us being conquered", one of the Quarks was fitted with a bomb which heavily damaged the Capitol, necessitating the construction of a replacement building. (AUDIO: Time in Office)
Previously, the Second Doctor cited the Quarks, "deadly robot servants of the cruel Dominators", as an example of the evils he had fought to the Time Lords during his trial, noting that their attempt enslave a peace loving race. (TV: The War Games)