Whenever an act, which is criminal only by reason of its being done with a criminal knowledge or intention, is done by several persons, each of such persons who joins in the act with such knowledge or intention is liable for the act in the same manner as if the act were done by him alone with that knowledge or intention.
Section 35 IPC
When such an act is criminal by reason of its being done with a criminal knowledge or intention
The Indian Penal Code, 1860 is repealed. It was replaced by The Bharatiya Nyaya Sanhita, 2023 from 1 July 2024; this provision still applies to matters that arose before then.