Fight fire with fire
To 'fight fire with fire' means to respond to an attack or an adverse situation by employing the same force, tactics or method as one's opponent, in other words, retaliating in kind. Shakespeare's play, King John, Act V, Scene I, 1595, is credited as the origin, "Be stirring as the time, be fire with fire; threaten the threatener." It has also been used literally as a fire-fighting technique since the 1840s, when fire-fighters set fires deliberately in the path of forest and bush fires to create a burnt area that effectively stopped said forest or bush fires.