From a thing done afterward. 
Ex post facto is one of the most widely used and referred maxim in the legal arena. It usually refers to the laws passed by the legislature which has a retrospective effect. Such laws are said to be Ex Post Facto as they affect the act which has already been committed before passing of the law or it can be said that the law was brought into action after the commission of the act.
Ex post facto law is a law which has a retrospective effect and changes the legal consequences of the actions which were committed in the past. It may criminalize actions that were legal when committed. Ex post fact laws can also bring changes in the punishment that is prescribed for committing a particular crime.
Indian Law Position:
In India, conviction and sentence under ex post facto laws is prohibited under the Article 20(1) of the Constitution of India. However, it should be noted that the term ‘ex post facto’ is nowhere provided under the Article 20(1) of the Indian Constitution. The Article 20(1) provides the following:
“No person shall be convicted of any offence except for violation of a law in force at the time of the commission of the act charged as an offence, nor be subjected to a penalty greater than that which have been inflicted under the law in force at the time of commission of the offence.”
Another point which should be taken into consideration is that, under the Article 20(1) only convicting and sentencing under a law which is having retrospective effect is prohibited, the enactment of the law itself is not prohibited. In American Legal System the enactment of such law itself is prohibited. The passing of Ex Post Facto laws is prohibited under clause 1 of Article 1, Section 10 of the constitution of the United States.
Legislative Assembly of ‘XYZ’ country passed an amendment in existing law which increased the penalty for committing the offence of ‘Drink & Drive’ to 10 years imprisonment from 5 years imprisonment. In this case, all those who were found to be guilty of committing the offence of ‘Drink & Drive’ before the passing of the amendment will be punished as per the earlier law and have to go through imprisonment for 5 years. Applying the amended law on them would be having ex post facto effect which will violate Article 20(1) of the Constitution of the ‘XYZ’ country.
Calder v. Bull
This was the first case which explained that ex post facto laws are prohibited by the Constitution of the United States.
Rao Shiv Bahadur Singh & Another v. The State Of Vindhya Pradesh
In the above mentioned case following things were provided by the honorable Supreme Court of India-
a) “ The prohibition contained in Article 20 of the Constitution against convictions and subjections to penalty under ex post facto laws is not confined in its operation to post-Constitution laws but applies also to ex post facto laws passed before the Constitution in their application to pending ”
b) “Article 20, however, prohibits only conviction or sentence under an ex post facto law, and not the trial thereof. Such trial under a procedure different from what obtained at the time of the offence or by a court different from that which had competence at that time cannot ipso facto be held to be unconstitutional.”
Barai Rao Shiv Bahadur Singh & Another v. The State Of Vindhya Pradesh
It was provided by the honorable Supreme Court of India in the above mentioned case that if certain provision of any act passed by the legislature is reducing the punishment of an offense committed before passing of that act. Then in such cases there is no reason why the accused should not have the benefit of such reduced punishment.
“It is quite clear that insofar as the Central Amendment Act creates new offences or enhances punishment for a particular type of offence no person can be convicted by such ex post facto law nor can the enhanced punishment prescribed by the amendment be applicable. But insofar as the Central Amendment Act reduces the punishment for an offence punishable under s. 16(1)(a) of the Act, there is no reason why the accused should not have the benefit of such reduced punishment. The rule of beneficial construction requires that even ex post facto law of such a type should be applied to mitigate the rigour of the law.”
Edited by Vigneshwar Ramasubramania
Approved & Published – Sakshi Raje
 INDIA CONST. art. 20, cl. 1.
 Calder v. Bull, 3 U.S. 386.
 Rao Shiv Bahadur Singh & Another v. The State Of Vindhya Pradesh, 1953 AIR 394.
 T. Barai v. Henry Ah Hoe & Another, 1983 AIR 150.