pregnant woman
Maryland high school has barred one of its students from the graduation ceremony because of her pregnancy - Representational image Getty

A Christian high school in the US state of Maryland has barred one of its students from attending the graduation ceremony because of her pregnancy.

Heritage Academy has said that Maddi Runkles, a senior at school, cannot attend the ceremony scheduled for June as she has to be held "accountable for her immorality".

The 18-year-old, who was in many ways a role model to other students earning straight A's in 2017 while serving as president of the Student Council, learnt about her pregnancy in January.

She knew she would have to put her college plans on hold and face consequences as students at Heritage Academy sign a pledge that includes "abstaining from sexual immorality", CBS News reported.

Soon after she revealed the news of her pregnancy, the school suspended Runkles for two days and removed her from leadership roles in student organisations. She was also barred from attending her graduation ceremony.

"So it's just dragging out my punishments. Continual punishment," she said.

Runkles' case has created a nationwide storm, with several people urging the school authorities to take her back. The 18-year-old has also been interviewed by several news outlets over the past week.

However, school principal David Hobbs issued a statement, saying, "Maddi is being disciplined, not because she's pregnant, but because she was immoral."

"Heritage is also pleased that she has chosen to not abort her son. However, her immorality is the original choice she made that began this situation."

"We love Maddi, we forgive her. We want her to be viewed as part of the Heritage family, but there's still accountability necessary," Hobbs added.

Runkles has said punishment should be the same for students who break other student codes.

An anti-abortion group – Students for Life – has also spoken out in favour of the teen and warned that the case could be a "turning point causing many students to turn away from the pro-life and Christian message".

Runkles has described her situation as "a blessing" and said, "Yeah, I know at the end of the day that I made the right choice and in a couple months, I'll have this little sweet reward just to remind me that I did the right thing."

She can still attend classes, reports suggest, and will receive her diploma, but not in front of her classmates.

The father of the baby is out of high school and did not attend Heritage. Runkles plans to name her baby Grayson, a nod, to God's grace and forgiveness.