CHARLOTTE, N.C. — Charlotte-Mecklenburg Schools (CMS) said its visitor check-in policy stopped a sex offender from getting into a school this week.

You might remember the first day of school when lines wrapped around school buildings because of the new procedure. Parents were aggravated and said the police kept them from walking their kids to class.

All visitors must now scan their ID for a badge to get into a CMS school.

"This is a result of our tightening our security and safety protocol," said Tracy Russ with CMS.

Those same safeguards stopped a sex offender on Wednesday at the new lobby guard station at Park Road Montessori.

"Even the superintendent, board members, everyone has to check in," Russ said.

A man who was part of a contract crew scanned his ID and sent up red flags.

"It is instantly run against the registered sex offender list," said Russ.

Within seconds, the school stopped the contractor and called the police.

"We have a lot of contractors on campuses, a lot of work to be done every day, so we're thankful that the system's working, that it's keeping students and staff safe," Russ said.

The incident comes on the heels of a similar close call at Barringer Elementary last month.

"I'd definitely say it's uncomfortable, definitely uncomfortable," one mom told NBC Charlotte.

But once again, the new CMS system instantly caught someone on the sex offender registry. CMS said the ID scan does take a minute or two, but it's worth every second.

"To make sure that we're doing everything we can to keep everyone safe in school and the focus can remain on teaching and learning where it should be," said Russ.

Sign up for the 5 Things to Know Newsletter