In mainland China, modafinil is strictly controlled like other stimulants such as amphetamines and methylphenidate. It is classified as Class I psychotropic drug. This classification means that modafinil is considered to have a high potential for abuse and dependence, and is therefore subject to strict regulation and control. As a result, modafinil is only available by prescription and cannot be purchased over the counter. In order to obtain a prescription for modafinil, a patient must have a valid medical reason for using the drug, such as narcolepsy or sleep apnea. Additionally, the prescription must be written by a licensed physician and filled at a licensed pharmacy. The use of modafinil for non-medical purposes, such as with the aim to improve cognitive performance or to stay awake for long periods of time, is strictly prohibited and can result in legal consequences.