el fin justifica los medios

Etymology
lit. 'the ends justify the means'. Compare.

Proverb

 * 1) the end justifies the means, the ends justify the means