Xavier Matthews was charged with bringing a gun to school. (Courtesy of Prince George's County Police/Courtesy of Prince George's County Police)

A Potomac High School student charged with bringing a gun to campus is also accused of assaulting a school resource officer, according to Prince George's County police.

Xavier Matthews, 17, of Temple Hills has been charged with assault and carrying a handgun on school property in connection with the incident that placed the Oxon Hill high school on lockdown Monday morning. Matthews is being charged as an adult, police said.

Matthews was searched and questioned after a school resource officer was alerted to a trespasser inside the school about 9:30 a.m., police said.

A teacher saw Matthews and another youth in a hallway exchanging money, according to police and school officials.

During the questioning, Matthews assaulted the officer, police said. The officer later recovered a gun from Matthews in a search, police said.

The other youth involved in the exchange was later identified as a former student. He left campus before the lockdown was lifted, police said.

Matthews is in jail on a $5,000 bond, police said.