Decree for the Reasonable Restriction of Underage Sorcery

"Dear Mr. Potter, We have received intelligence that you performed the Patronus Charm at twenty-three minutes past nine this evening in a Muggle-inhabited area and in the presence of a Muggle. The severity of this breach of the Decree for the Reasonable Restriction of Underage Sorcery has resulted in your expulsion from Hogwarts School of Witchcraft and Wizardry. Ministry representatives will be calling at your place of residence shortly to destroy your wand. As you have already received an official warning for a previous offense under section 13 of the International Confederation of Wizards’ Statute of Secrecy, we regret to inform you that your presence is required at a disciplinary hearing at the Ministry of Magic at 9 a.m. on August 12th. Hoping you are well. Yours sincerely, Mafalda Hopkirk, Improper Use of Magic Office."

- Mafalda Hopkirk's letter adressed to Harry Potter on August 2, 1995

The Decree for the Reasonable Restriction of Underage Sorcery is a bylaw of the Ministry of Magic, written in 1875, which bans the use of underage magic outside of school. The Decree is enforced by the Ministry's Improper Use of Magic Office. The restriction is for wizards and witches who are under the age of seventeen, and who still have the Trace on them. Although young wizards and witches are not allowed to use magic outside of school, the Ministry does recognise that they may have to use magic in certain situations such as self-defence. In addition, young children of below school age are technically exempt from the rule since they usually have little or no control over the magic they perform.

"In the matter of Harry Potter, the law cleary states that magic can be used before Muggles in life-threatening situations."

- Albus Dumbledore at Harry Potter's Disciplinary Hearing

Paragraph C of the cause states that it is a crime to knowingly perform magic in a Muggle-inhabited area and in the presence of a Muggle. However, Clause 7 states that magic can be used in front of Muggles in exceptional circumstances, including situations when the life of the witch or wizard is threatened, or the lives of other witches, wizards and Muggles are threatened.

Also, it seems that a certain high-authority person may give permission for an underage student to perform magic under circumstances, as Hogwarts Headmaster Albus Dumbledore gave 16-years old Harry Potter such under the chance of an attack.

Appearances

 * Harry Potter and the Chamber of Secrets
 * Harry Potter and the Chamber of Secrets (film)
 * Harry Potter and the Prisoner of Azkaban
 * Harry Potter and the Prisoner of Azkaban (film)
 * Harry Potter and the Order of the Phoenix
 * Harry Potter and the Order of the Phoenix (film)

Behind the scenes

 * In the film versions of Harry Potter and the Philosopher's Stone and Harry Potter and the Chamber of Secrets, Hermione casts the Oculus Reparo spell to fix Harry's glasses - the first time on the Hogwart's Express, and the second time in public in Diagon Alley. There's no indication that she got into trouble for either non-school use; it's possible the Reparo spell was considered too mundane or harmless to violate the so-called "Reasonable Restriction". And the first use of the spell might have been ignored if the train is considered an extension of the school. This latter point is supported by the novel Harry Potter and the Order of the Phoenix in which Ginny Weasley casts the Scouring Charm aboard the Express without penalty.
 * In the film version of Harry Potter and the Chamber of Secrets Harry did not receive a warning for the illegal use of a Hover Charm which caused an continuity error with the following films due to the fact that the book version of the Chamber of Secrets caused the Dursley family to learn that Harry can't use magic outside of school.
 * The film version of Harry Potter and the Prisoner of Azkaban has Harry using the spell Lumos Maxima which was invented for the films despite his using it at the time would had a warning sent to him since he used it while at the Dursley's house.