Every one sees what you appear to be, few really know what you are, and those few dare not oppose themselves to the opinion of the many, who have the majesty of the state to defend them; and in the actions of all men, and especially of princes, which it is not prudent to challenge, one judges by the result. For that reason, let a prince have the credit of conquering and holding his state, the means will always be considered honest, and he will be praised by everybody because the vulgar are always taken by what a thing seems to be and by what comes of it.
Niccolò Machiavelli (1469-1527) Italian politician, philosopher, political scientist
The Prince, ch. 18 (1513) [tr. Marriott (1908)]
(Source)
Origin of the paraphrase "The ends justify the means," which is generally attributed to Machiavelli.