The principle of in dubio pro reo (Latin for "[when] in doubt, rule for the accused")[1][2] means that a defendant may not be convicted by the court when doubts about their guilt remain.
The rule of lenity is the doctrine that ambiguity should be resolved in favour of the more lenient punishment.[3]
To resolve all doubts in favour of the accused is in consonance with the principle of presumption of innocence.[3]
Origin
The main principle in the sentence was part of Aristotle's interpretation of the law and shaped the Roman law: Favorabiliores rei potius quam actores habentur (Digest of Justinian I, D.50.17.125),[4] meaning "The condition of the defendant is to be favored rather than that of the plaintiff."[5] However, the phrase was not spelled out word for word until the Milanese jurist Egidio Bossi (1487–1546) related it in his treatises.
National peculiarities
In German law, the principle is not codified but has constitutional status and is derived from Article 103(2) of the Basic Law, Article 6 of the ECHR, and Section 261 of the Code of Criminal Procedure. The common use of the phrase in the German legal tradition was documented in 1631 by Friedrich Spee von Langenfeld.
In Canadian law, the leading case establishing how to decide criminal cases where the guilt of the accused depends on contradictory witness accounts is R. v. W.(D.) (1991).
^Beard, Henry (2004-08-19). Latin for All Occasions: From Cocktail-Party Banter to Climbing the Corporate Ladder to Online Dating-- Everything You'll Ever Need to Say in Perfect Latin. Avery. ISBN978-1592400805.