Act done by a person justified, or by mistake of fact believing himself, justified, by law
IPC 79 (Act done by a person justified, or by mistake of fact believing himself, justified, by law) corresponds most closely to BNS 17, Act done by a person justified, or by mistake of fact believing himself justified, by law, on a text comparison scoring 100 per cent. The Indian Penal Code, 1860 was repealed with effect from 01 Jul 2024, but conduct before that date is still charged, tried and appealed under it.
Repealed · Indian Penal Code
Section 79 Act done by a person justified, or by mistake of fact believing himself, justified, by law
Nothing is an offence which is done by any person who is justified by law, or who by reason of a mistake of fact and not by reason of a mistake of law in good faith, believes himself to be justified by law, in doing it.
Illustration
A sees Z commit what appears to A to be a murder. A, in the exercise, to the best of his judgment exerted in good faith, of the power which the law gives to all persons of apprehending murderers in the fact, seizes Z, in order to bring Z before the proper authorities. A has committed no offence, though it may turn out that Z was acting in self-defence.
In force · Bharatiya Nyaya Sanhita
Section 17 Act done by a person justified, or by mistake of fact believing himself justified, by law
Nothing is an offence which is done by any person who is justified by law, or who by reason of a mistake of fact and not by reason of a mistake of law in good faith, believes himself to be justified by law, in doing it.
Illustration
A sees Z commit what appears to A to be a murder. A, in the exercise, to the best of his judgment exerted in good faith, of the power which the law gives to all persons of apprehending murderers in the fact, seizes Z, in order to bring Z before the proper authorities. A has committed no offence, though it may turn out that Z was acting in self-defence.
Other provisions with similar text
The next closest matches, in order. Where a provision was split or merged, the answer is often more than one of these.
How this table was made, and what it is not
There is no official machine-readable correspondence between the Indian Penal Code, 1860 and the Bharatiya Nyaya Sanhita, 2023. The Ministry published comparison charts for human readers; nothing exists that a computer can check. So this is not an official mapping and we do not present it as one.
What it measures is how alike the text of two provisions is. For each provision of the old enactment we compare its words against every provision of the new one and report the closest, with the score. That works here because the new codes are largely a renumbering rather than a rewrite: where a provision carried over near-verbatim the match is self-evidencing, and you can see it for yourself, because both texts are set out side by side on every entry.
Where the law genuinely changed, the score falls and the entry says no close match found rather than offering a guess. Those entries matter: they are where the reform actually did something.
Check before you cite. A high score means the words are alike, not that a court has held the provisions equivalent. For that, read both texts and the Gazette.
Source and method. Compiled from the enactments of Parliament and of the State legislatures as published on India Code, and republished together with commentary and other original matter under section 52(1)(q)(ii) of the Copyright Act, 1957. Structured, cross-referenced and maintained by eCourtsIndia. This page is not a substitute for legal advice.