(1) If, in any case instituted upon complaint or upon information given to a police officer or to a Magistrate, one or more persons is or are accused before a Magistrate of any offence triable by a Magistrate, and the Magistrate by whom the case is heard discharges or acquits all or any of the accused, and is of opinion that there was no reasonable ground for making the accusation against them or any of them, the Magistrate may, by his order of discharge or acquittal, if the person upon whose complaint or information the accusation was made is present, call upon him forthwith to show cause why he should not pay compensation to such accused or to each or any of such accused when there are more than one; or, if such person is not present, direct the issue of a summons to him to appear and show cause as aforesaid.
(2) The Magistrate shall record and consider any cause which such complainant or informant may show, and if he is satisfied that there was no reasonable ground for making the accusation, may, for reasons to be recorded, make an order that compensation to such amount, not exceeding the amount of fine he is empowered to impose, as he may determine, be paid by such complainant or informant to the accused or to each or any of them.
(3) The Magistrate may, by the order directing payment of the compensation under sub-section (2), further order that, in default of payment, the person ordered to pay such compensation shall undergo simple imprisonment for a period not exceeding thirty days.
(4) When any person is imprisoned under sub-section (3), the provisions of sections 68 and 69 of the Indian Penal Code (45 of 1860) shall, so far as may be, apply.
(5) No person who has been directed to pay compensation under this section shall, by reason of such order, be exempted from any civil or criminal liability in respect of the complaint made or information given by him:
Provided that any amount paid to an accused person under this section shall be taken into account in awarding compensation to such person in any subsequent civil suit relating to the same matter.
(6) A complainant or informant who has been ordered under sub-section (2) by a Magistrate of the second class to pay compensation exceeding one hundred rupees, may appeal from the order, as if such complainant or informant had been convicted on a trial held by such Magistrate.
(7) When an order for payment of compensation to an accused person is made in a case which is subject to appeal under sub-section (6), the compensation shall not be paid to him before the period allowed for the presentation of the appeal has elapsed, or, if an appeal is presented, before the appeal has been decided; and where such order is made in a case which is not so subject to appeal the compensation shall not be paid before the expiration of one month from the date of the order.
(8) The provisions of this section apply to summons-cases as well as to warrant-cases.