The principal of Great Valley High School in Malvern resigned Tuesday after being charged following his admission to police and prosecutors that he stole prescription drugs from the school nurse's office, officials said.

Michael Flick, principal of the approximately 1,150-student school since 2012, "acknowledged his involvement in the incident, has cooperated with the authorities, and has informed us that he is seeking treatment," according to an email sent to parents by Great Valley School District superintendent Regina Speaker Palubinsky.

Flick, 44, has been charged with multiple counts of possession of a controlled substance and theft. A source with knowledge of the investigation who was not authorized to comment on the probe said that the missing pills were for treating ADHD.

"This news comes as a tremendous shock to our school community, and there are many details that we are not able to share," Palubinsky said. "However, together, we will work through this difficult time. Mr. Flick's intent was not to harm students, and he has asked that we share with you his apology and deep regrets."

Flick told police that he has been addicted to drugs since an automobile accident several years ago, according to the source.

The investigation began after the school nurse noticed last Wednesday that 93 pills were unaccounted for, according to the criminal complaint.  They had been removed from six containers belonging to five students. Charges were filed after the East Whiteland Police Department and Chester County District Attorney's Office conducted an investigation,  narrowing down who had access to the nurse's office and reviewing video footage.

The school district, in Charlestown, East Whiteland, and Willistown Townships in an affluent expanse of eastern Chester County, is known for its highly rated schools.

The superintendent said Great Valley High students will be offered guidance and support Wednesday morning and told that additional counselors will be on hand for who request it.

Heidi Capetola, who has served as assistant principal at Great Valley High since 2012, will assume the role of principal, Palubinsky's email said.

The superintendent's letter to parents included a quote that she attributed to Flick's resignation letter to the school board:

"I deeply regret any pain I may have caused, and I apologize to anyone who feels I have let them down. It is with a very sad heart that I am resigning as principal, as I seek treatment and rehabilitation and the opportunity to focus on my health and family. I encourage anyone dealing with these issues to reach out for help. May our students view my experience as a reminder that seeking professional help is always the right decision."

Flick, according to his district web page, is a 1992 graduate of Great Valley High. He is a graduate of Pennsylvania State University with advanced degrees from Immaculata College, and previously taught special ed and was an assistant principal in the Oley Valley and Owen J. Roberts School Districts before returning to Great Valley High as an assistant principal in 2009.

He has coached varsity baseball and golf, according to his bio, and is said to be well-liked in the Great Valley community. His wife is a third-grade teacher in the Owen J. Roberts district, and they have three children.

"Knowing that substance abuse is an epidemic in our country, we are committed to proactively offering support services to our school community," Palubinsky told parents in the email. "We will be meeting with all of our staff to ensure they are aware of the array of support services available for anyone who is struggling with stress, mental health, or dependency. We will also continue to focus on mental health with our students – through our outreach efforts, in class programs, and in after-school activities."