Niccolò Machiavelli said this quote

And you have to understand this, that a prince, especially a new one, cannot observe all those things for which men are esteemed, being often forced, in order to maintain the state, to act contrary to faith, friendship, humanity, and religion. “ The Prince, XVIII, 5