A 39-year-old Virginia Beach man will spend 10 years in prison for shooting at a man in the parking lot of an Econo Lodge in 2014.

Officials say Joseph Larry Williams, of the 400 block of Duplin Street, shot at an unknown man in the hotel’s parking lot around 5:30 a.m. on June 14, 2014. (Courtesy of the Virginia Beach Sheriff’s Office)

Officials say Joseph Larry Williams, of the 400 block of Duplin Street, shot at an unknown man in the hotel’s parking lot around 5:30 a.m. on June 14, 2014. The shooting involved a series of interactions with the victim in which Williams repeatedly asked him if he had a problem, according to a news release from the Virginia Beach Commonwealth’s Attorney’s office.

The victim, who was visiting friends at the hotel on Northampton Boulevard, wasn’t harmed during the shooting.

Williams was a passenger in his girlfriend’s car when police chased it on I-64 West until it crashed in Norfolk. During the chase, Williams threw a gun out of the window of the car, which police found during the investigation.

Williams was arrested when police found him hiding inside a dumpster, the release states.

He pleaded guilty on July 30 to use of a firearm in the commission of a felony, malicious wounding and violence possession of a firearm by a felon. His plea came after a jury listened to a case against him, but before they released their verdict.

Williams has a criminal history that includes robbery, malicious wounding, illegal gambling, marijuana possession, larceny, resisting arrest, eluding police, assault and conspiracy, as well as several traffic and probation violations.