NAGS HEAD, N.C. (AP) — School resource officer Shane Allen walked down the hallway of Nags Head Elementary School and saw a lone student with a slight limp coming toward him.

"Eli, what did you do?" he asked him.

The boy explained he had fallen in math class while studying fractions.

"Was it fractions or fractures?" Allen quipped.

The boy smiled and went on his way for treatment .

Students at the pre-kindergarten through fifth grade school know Allen as Officer Shane. The children throw their hands up for a high-five when they see him. He has a good sense of humor and a gentle way with kids, and he loves his job.

At the same time, the fourth generation law enforcement officer with 23 years experience carries a badge and a gun.

"My mindset is first and foremost the safety of these children," he said.

Dare County is one of just four districts among North Carolina's 115 to have a resource officer in every school, said Michael Anderson, community development and training manager for the N.C. Center for Safer Schools, part of the state's Department of Public Instruction. Expense, district size and lack of resources often prevent placing officers in elementary schools, he said.

Sheriff Doug Doughtie, along with town and county officials, committed to putting officers in the county's five elementary schools following the Sandy Hook Elementary School shooting in 2012. The high schools and middle schools already had officers.

"I do believe if he or she knows we are there and we are armed then that is a big deterrent, yes sir," Doughtie said. "You're hoping that's going to be enough."

Norfolk, Portsmouth and Virginia Beach have officers in high schools and middle schools, but not in the dozens of elementary schools. Police departments are typically close, and other school officers often check on elementary schools, according to respective spokespersons. In Chesapeake, police are assigned to monitor schools within an assigned area.

The Feb. 14 shooting where 17 died at a high school in Parkland, Fla., brought more attention to the issue of armed school officers. The deputy there was criticized nationally for going outside and avoiding the shooter. Doughtie emphasized to officers afterward they must protect students even at the risk of their own safety, he said.

"They've got to engage," said Doughtie, a former school officer. "We've got to make sure the children go home."

A 2015 study by the N.C. Center for Safer Schools showed more than half of school officers saw weapons on campus over a six-month span and more than 80 percent saw a fight or assault.

Respondents said elementary schools need officers. State Superintendent Mark Johnson has called for more school officers.

North Carolina-based Education Justice Alliance disagrees, calling for more prevention and mental health treatment. An arrest over minor trouble can unnecessarily give a student a criminal record, according to the group's website.

"We strongly oppose policies and practices that increase the presence of weapons and law enforcement on school grounds," it said.

But any fight can turn dangerous quickly, said Anderson, who has worked as an officer at a large school. Most of the time, school staff call 911 anyway. Better to have an officer there who knows the students rather than unfamiliar responders, Anderson said.

Deputies are trained to peacefully resolve a fray before using verbal commands. The last resort would be using force, he said.

"A lot of people don't realize they are police officers first and are going to deal with the situation in front of them," he said.

N.C. Justice Academy offers a wide range of courses for the job, he said.

"The more training they receive, the better able they are to respond," Anderson said.

Allen has received about 400 hours of training related to his duties, he said. He talks with students and staff, reads in classes and often plays quarterback for recess games. He has a sign in his office that says "The bestest occifer ever," a quote from a kindergartner who got her c's and f's mixed up.

"I look forward to doing this as long as they will let me," he said.

___

Information from: The Virginian-Pilot, http://pilotonline.com