Leon Trotsky said this quote

The end may justify the means as long as there is something that justifies the end.