A former Maranacook High School student was charged with impersonating a police officer after he allegedly showed a badge and, armed with a loaded gun, talked his way into a post-game meeting Tuesday night with the Maranacook/Winthrop boys’ lacrosse team to talk with them about sexting.

Caleb Jackson, 19, of Wayne, was charged by police with impersonating a public servant, carrying a concealed weapon and possessing a gun on school property at Kents Hill School in Readfield, where the lacrosse team had just played.

Jackson was taken to the Kennebec County jail and was freed later on bail, according to a news release from Steve McCausland, spokesman for the Maine Department of Public Safety. Police would not say Wednesday whether they know of a motive Jackson had for his alleged conduct.

Taylor Wilbur, 18, of Manchester, played basketball and other sports with Jackson for about a decade, dating back to youth leagues. Wilbur, who was named the Kennebec Journal’s Player of the Year for the 2013-14 season, said Wednesday that he and others who know Jackson were stunned by the news.

“None of us saw this coming. It’s kind of scary,” Wilbur said. “I was 100 percent surprised. It just doesn’t seem like him. It seems way out of character. Everybody’s been talking about it. A lot of people are affected by it, too.”

Jackson, who graduated in 2014 from Maranacook, played the position of guard in basketball and was an honorable mention when he was a senior on the Kennebec Journal boys basketball team. According to his Facebook page, he attends the University of New Hampshire.

Attempts to reach Jackson for comment Wednesday were unsuccessful.

Meanwhile, a private meeting for parents and members of the lacrosse team to discuss the incident with authorities was scheduled for 5:30 p.m. Wednesday at the Performing Arts Center at Maranacook Community High School, according to Principal Dwayne Conway.

“We want to make sure we all have the same information and everyone is on the same page and we can answer any questions they might have,” Conway said Wednesday afternoon.

Jackson, who had a holstered and loaded gun on his belt hidden under his coat, approached boys’ lacrosse coach Zach Stewart about 6 p.m. Tuesday as Stewart walked off the field after his team’s loss to Messalonskee and said there had been a report filed in regards to the lacrosse team.

“He had a gun and he had a badge,” Stewart said in an interview. “He comes up and says, ‘I need to talk with you and I need to talk with your team,’ and he showed me his badge.”

Jackson claimed he was a federal officer, Stewart said, so he rounded up the team — about 15 or 20 boys — and they went to the Alfond Athletic Center next to the field and had a “closed-door conversation with him and the team.”

Stewart said Jackson wanted to talk about “sexting,” which is the sending of sexually explicit language or images via text message.

“He made some strong accusations (about members of the team),” Stewart said, though he wouldn’t elaborate on those accusations.

Stewart said he didn’t want the students questioned without representation, so he called police. He said he didn’t recognize Jackson as a recent Maranacook graduate. He said people at the game knew Jackson and were talking to him during the game, but he didn’t say whether any lacrosse team members knew him.

Jackson was still on the school grounds when state police got there, McCausland said, and they arrested him.

The gun, which was loaded when police found it in Jackson’s car, was not taken out of the holster during the meeting with the team, and there’s no indication that Jackson threatened anyone, police said.

Maine State Police Lt. Mark Brooks, commander of Troop C in Skowhegan, said Trooper Jed Malcore, who is leading the investigation, would be available to answer questions Wednesday night at the Maranacook meeting. “If you were a parent, you might have some questions as to why it went down the way it did last night,” Brooks said. “The primary issue for everyone is that a weapon was on school grounds.”

Lisa Gibson, 46, of Wayne, said her son Jake Gibson, a junior midfielder/defender on the lacrosse team, told her about the incident.

“I wish they had questioned the individual before allowing the meeting. It could’ve been handled a little bit better,” Gibson said. “I’m glad everyone is OK, but you do have to question authority a little bit.”

Gibson said she called Maine State Police on Wednesday morning before learning they were already involved in the matter.

“I was very concerned. It’s a scary situation,” she said. “It’s a learning experience for my son, and I’m just thankful everyone is OK.”

Brooks said that in most cases, a law enforcement officer’s identity should be “self-evident,” since they usually travel in a marked police vehicle and are uniformed. He said if someone isn’t sure whether someone who represents himself or herself as a law enforcement officer is genuine, the person should ask for identification and documentation.

People also can contact the local police department or emergency communications center to double-check an officer’s identity if they don’t believe the person claiming to be an officer, Brooks said.

“I can understand why people are frustrated at the coach and athletic director,” Brooks said, “but in the end, they were trying to be cooperative and make sure that their team members weren’t taking part in a criminal act.”

Staff Writer Randy Whitehouse and Sports Editor Bill Stewart contributed to this report.