ROWAN COUNTY, N.C. -- A man was charged with a misdemeanor after carrying a gun onto the property of a local middle school.

Erwin Middle School Resource Officer, Deputy Mason, first noticed a man appearing to wear a badge and gun Monday morning when the man entered the school's front office.

The man, identified as Mark Lee Greenfield, told deputies he was a licensed security officer contracted by Attorney Todd Paris' Law Firm to serve a subpoena to the principal of the school.

According to the police report, Greenfield quoted a North Carolina General Statue during the incident claiming he believed it protected his rights to be on school grounds with the weapon. The report also notes it was Greenfield's understanding that he was in the performance of his duties and could carry his weapon on school grounds.

"Law enforcement was involved when it was discovered that a visitor on our school campus yesterday (Monday) was carrying a weapon," said Erwin Middle School Principal Daniel Harring. "The incident was handled quickly and at not time were students in any danger."

Principal Harring said the school is continuing to work closely with law enforcement following the incident.

"We are grateful to them for the strong support we receive on a daily basis in keeping Erwin a safe place for our students and staff," Harring said.

Gary Pastor of Attorney Todd Paris' law firm confirmed to NBC Charlotte that Greenfield was an employee for the past 14 months, but tenured his resignation following the incident saying, "it was the right thing to do."

The Rowan County District Attorney's Office determined no provisions were made in North Carolina General Statue 14-269.2(f) that allowed Greenfield to carry his sidearm on the school's campus.

Authorities cited Greenfield and charged him with a misdemeanor for violating the statue. His court date is set for March 19.

NBC Charlotte stopped by Greenfield's residence in Kannapolis for a statement, but the woman who answered the door denied the opportunity to comment.