For the next 24 hours, a host of Class A drugs are legal (or else in a legal quandary) in Ireland due to an accidental loophole in drug laws.

The Dáil will sit tonight to pass emergency legislation after the 1977 Misuse of Drugs Act was found unconstitutional by the Irish Court of Appeal this morning, making the drugs it prohibits (technically) legal.

The bill will be rushed through but comes with a provision that states it can only take effect on the day after its signature, placing Ireland in a very grey area with regards to the legality of drugs including ecstasy, ketamine and magic mushrooms until midnight on Thursday.

In what it deemed a "constitutional issue of far-reaching importance", the three-judge Court of Appeal unanimously declared a regulation making the possession of methylethcathinone (known as 4-Mec or Snow Blow) illegal now invalid, as the 1977 Act was being added to without consultation of the Oireachtas (Irish parliament).

The Department of Health issued an explanatory memorandum saying that as a result of the judgement, "all substances controlled by means of Government Orders made under section 2(2) cease to be controlled with immediate effect, and their possession ceases to be an offence. These include ecstasy, benzodiazepines and new psychoactive substances, so-called ‘headshop drugs’".

Drug addiction, overdoses, and a very brief history of Heroin Show all 14 1 /14 Drug addiction, overdoses, and a very brief history of Heroin Drug addiction, overdoses, and a very brief history of Heroin Heroin – the chemical name for which is diacetylmorphine – was originally synthesized by British chemist C.R.Alder Wright (pictured overleaf) in 1874, by adding two acetyl groups to the molecule morphine, which is naturally found in the opium poppy. Drug addiction, overdoses, and a very brief history of Heroin Bayer, the German pharmaceutical company behind Alka-Seltzer and Aspirin, bought the rights to diacetylmorphine, marketing it under the name “Heroin” in 1895 because early testers said that it made them feel “heroisch” or “heroic”. Drug addiction, overdoses, and a very brief history of Heroin By 1898, it was ready for mass marketing. It was originally sold as an over-the-counter cough suppressant that didn’t have problematic side effects, like addiction (the irony) - while alternative treatments morphine and codeine did. This was before they realised that, when taken into the body, it actually converts into morphine, and is ferociously addictive. Thus defeating the object and defining what was to become a historically embarrassing moment for the company in later years. Drug addiction, overdoses, and a very brief history of Heroin By 1899 Bayer was producing a ton of Heroin and exporting the drug to 23 countries, while free samples sent to doctors and studies appeared in medical journals. It was also around this time that early reports of addiction began to surface. The company wisely released Aspirin this year, which would go on to become one of the most popular and widely used pain relief drugs in the world. Drug addiction, overdoses, and a very brief history of Heroin US medicines containing heroin were available over the counter from 1907, after the American Medical Association gave it its stamp of approval. Drug addiction, overdoses, and a very brief history of Heroin As Heroin dependency became a torrent and overdoses began to be reported, Heroin was made illegal to obtain without a prescription from a doctor in the US in 1914. Bayer lost some of its trademark rights to Heroin and Aspirin under the Treaty Of Versailles in 1919, after the German defeat in World War I. Drug addiction, overdoses, and a very brief history of Heroin In the early 1920s, a number of addicted users in New York supported themselves by collecting and selling scrap metal retrieved from industrial dumps. It was from this that the label “junkies” was born. The behavior of Heroin addicts was soon, however, to cause a concern to the public and the authorities. In 1924, it became completely illegal, and doctors were told they could no longer prescribe the drug. Drug addiction, overdoses, and a very brief history of Heroin By this point, Heroin had become popular among creative industries. Pictured left is famed actress Jeanne Eagels, who died of a Heroin overdose in 1929. Its outlawed use had pushed manufacturers underground, and the purity of the product illegal traders now used varied in quality. Drug addiction, overdoses, and a very brief history of Heroin In the UK, the Rolleston Committee Report in 1926, illegal Heroin dealers were prosecuted, but doctors could prescribe diacetylmorphine to users when they were withdrawing from it, if it would cause harm or severe distress to the patient to go without it. This would be the law until 1959 when the number of diacetylmorphine addicts doubled every 16 months between 1959 and 1968. Drug addiction, overdoses, and a very brief history of Heroin The Brain Committee recommended that only selected, specially approved doctors at specialized centres were allowed to prescribe diacetylmorphine to users in 1964. The law was further restricted in 1968, and by the 1970s, the emphasis shifted to encouraging abstinence and the use of substitute methadone. Drug addiction, overdoses, and a very brief history of Heroin In the 1980s, the UK experienced a surge in Heroin supply because of a sudden cheap influx from Pakistan (the main supplier had been – and is now – Afghanistan). Cues from popular culture – and a social downtown caused by the economic and industrial crisis in the late 1970s – created the perfect environment for the Trainspotting generation. Drug addiction, overdoses, and a very brief history of Heroin In the 1990s, Heroin use was again popularized by the rise of grunge and Britpop, while the emergence of ‘the waif’ in fashion, of which Kate Moss is often cited as the originator, would give rise to the term ‘Heroin chic’. In 1994, the Swiss began to trial a diamorphine maintenance program for users who had failed multiple withdrawal programs. It aimed to maintain the health of the user, by discouraging the use of illicit street Heroin. It was deemed a success. Drug addiction, overdoses, and a very brief history of Heroin Today, the largest producer of opium, needed to create Heroin is Afghanistan. This is closely followed by Mexico, who increased their rate of production sixfold between 2007 and 2011. Diacetylmorphine is a controlled, Class A substance in the UK, but continues to be used in palliative care for the treatment of acute pain, such as in severe physical trauma, post-surgical and chronic pain, as well as relieving sufferers of terminal illnesses. Drug addiction, overdoses, and a very brief history of Heroin Key figures continue to campaign for greater sympathies and better treatment of Heroin addicts as they attempt to rehabilitate themselves and re-enter society. Russell Brand’s Give it Up Fund, run in conjunction with Comic Relief, aims to provide financial aid to help people remain free from substance abuse by setting up support groups. "It's integral that people entering a life of abstinence after the chaos of addiction have stability, support and a role to play in the wider community," he said.

Ecstasy refers to MDMA, while benzodiazepines include diazepam or 'Valium'.

However, according to The Journal, the act has also been used to outlaw the possession of ketamine, magic mushrooms and other drugs.

125 substances are thought to not be affected by the judgement and remain as illegal as ever, including cannabis, heroin and cocaine.

A Misuse of Drugs Amendment Bill will be considered in the Dáil by the Health Minister Leo Varadkar between 8pm and 11pm tonight, with a Sinn Fein private members' bill having to be postponed while the government prevents widespread drug-addled pandemonium.

Drug addiction, overdoses, and a very brief history of Heroin Show all 14 1 /14 Drug addiction, overdoses, and a very brief history of Heroin Drug addiction, overdoses, and a very brief history of Heroin Heroin – the chemical name for which is diacetylmorphine – was originally synthesized by British chemist C.R.Alder Wright (pictured overleaf) in 1874, by adding two acetyl groups to the molecule morphine, which is naturally found in the opium poppy. Drug addiction, overdoses, and a very brief history of Heroin Bayer, the German pharmaceutical company behind Alka-Seltzer and Aspirin, bought the rights to diacetylmorphine, marketing it under the name “Heroin” in 1895 because early testers said that it made them feel “heroisch” or “heroic”. Drug addiction, overdoses, and a very brief history of Heroin By 1898, it was ready for mass marketing. It was originally sold as an over-the-counter cough suppressant that didn’t have problematic side effects, like addiction (the irony) - while alternative treatments morphine and codeine did. This was before they realised that, when taken into the body, it actually converts into morphine, and is ferociously addictive. Thus defeating the object and defining what was to become a historically embarrassing moment for the company in later years. Drug addiction, overdoses, and a very brief history of Heroin By 1899 Bayer was producing a ton of Heroin and exporting the drug to 23 countries, while free samples sent to doctors and studies appeared in medical journals. It was also around this time that early reports of addiction began to surface. The company wisely released Aspirin this year, which would go on to become one of the most popular and widely used pain relief drugs in the world. Drug addiction, overdoses, and a very brief history of Heroin US medicines containing heroin were available over the counter from 1907, after the American Medical Association gave it its stamp of approval. Drug addiction, overdoses, and a very brief history of Heroin As Heroin dependency became a torrent and overdoses began to be reported, Heroin was made illegal to obtain without a prescription from a doctor in the US in 1914. Bayer lost some of its trademark rights to Heroin and Aspirin under the Treaty Of Versailles in 1919, after the German defeat in World War I. Drug addiction, overdoses, and a very brief history of Heroin In the early 1920s, a number of addicted users in New York supported themselves by collecting and selling scrap metal retrieved from industrial dumps. It was from this that the label “junkies” was born. The behavior of Heroin addicts was soon, however, to cause a concern to the public and the authorities. In 1924, it became completely illegal, and doctors were told they could no longer prescribe the drug. Drug addiction, overdoses, and a very brief history of Heroin By this point, Heroin had become popular among creative industries. Pictured left is famed actress Jeanne Eagels, who died of a Heroin overdose in 1929. Its outlawed use had pushed manufacturers underground, and the purity of the product illegal traders now used varied in quality. Drug addiction, overdoses, and a very brief history of Heroin In the UK, the Rolleston Committee Report in 1926, illegal Heroin dealers were prosecuted, but doctors could prescribe diacetylmorphine to users when they were withdrawing from it, if it would cause harm or severe distress to the patient to go without it. This would be the law until 1959 when the number of diacetylmorphine addicts doubled every 16 months between 1959 and 1968. Drug addiction, overdoses, and a very brief history of Heroin The Brain Committee recommended that only selected, specially approved doctors at specialized centres were allowed to prescribe diacetylmorphine to users in 1964. The law was further restricted in 1968, and by the 1970s, the emphasis shifted to encouraging abstinence and the use of substitute methadone. Drug addiction, overdoses, and a very brief history of Heroin In the 1980s, the UK experienced a surge in Heroin supply because of a sudden cheap influx from Pakistan (the main supplier had been – and is now – Afghanistan). Cues from popular culture – and a social downtown caused by the economic and industrial crisis in the late 1970s – created the perfect environment for the Trainspotting generation. Drug addiction, overdoses, and a very brief history of Heroin In the 1990s, Heroin use was again popularized by the rise of grunge and Britpop, while the emergence of ‘the waif’ in fashion, of which Kate Moss is often cited as the originator, would give rise to the term ‘Heroin chic’. In 1994, the Swiss began to trial a diamorphine maintenance program for users who had failed multiple withdrawal programs. It aimed to maintain the health of the user, by discouraging the use of illicit street Heroin. It was deemed a success. Drug addiction, overdoses, and a very brief history of Heroin Today, the largest producer of opium, needed to create Heroin is Afghanistan. This is closely followed by Mexico, who increased their rate of production sixfold between 2007 and 2011. Diacetylmorphine is a controlled, Class A substance in the UK, but continues to be used in palliative care for the treatment of acute pain, such as in severe physical trauma, post-surgical and chronic pain, as well as relieving sufferers of terminal illnesses. Drug addiction, overdoses, and a very brief history of Heroin Key figures continue to campaign for greater sympathies and better treatment of Heroin addicts as they attempt to rehabilitate themselves and re-enter society. Russell Brand’s Give it Up Fund, run in conjunction with Comic Relief, aims to provide financial aid to help people remain free from substance abuse by setting up support groups. "It's integral that people entering a life of abstinence after the chaos of addiction have stability, support and a role to play in the wider community," he said.

"We had no way of knowing what the Court would decide today, but we prepared for this possibility," Varadkar said. "Legislation was prepared and approved in advance by Cabinet. The emergency legislation I am introducing today will re-instate the status quo ante and re-control all drugs that were controlled prior to this judgment."

The ruling could throw many past convictions into question.

"I'm told it's dozens," the minister added. "But I can't say for certain because what they'll have to do now is go thought each individual case and see if the people in question were charged just under this section of the act, or if they were charged with other acts as well."

Update: Varadkar has suggested that supply and sale of controlled drugs remains illegal, though it is not clear what legislation he is basing this on.

Update 2: Quite separately, the Irish government might have also accidentally managed to outlaw heterosexual marriage today.