A man who pointed a gun at two teenagers in west Casper in April pleaded guilty to two counts of aggravated assault and battery during a hearing in Natrona County District Court on Tuesday.

Michael W. McLaughlin, 23, will serve between three and five years at the Wyoming State Penitentiary in exchange for the plea before Judge Catherine Wilking.

Two other counts -- aggravated robbery and possession of a deadly weapon with unlawful intent -- will be dismissed, Public Defender Rob Oldham and Assistant District Attorney Trevor Schenk told Wilking.

The plea was an Alford Plea, which means the defendant does not admit that they are guilty of the crime charged, but they concede that the prosecution would likely be able to obtain a conviction at trial. For sentencing purposes, an Alford plea is functionally similar to a guilty plea.

If the case had gone to trial and McLaughlin was convicted on all counts, he could have faced between five years and 50 years in prison.

Wilking told McLaughlin that she is not a party to the plea and could reject the terms of the agreement between Oldham and Schenk.

McLaughlin remains in custody on a $50,000 bond.

The case started April 20 when Casper police officers and deputies of the Natrona County Sheriff's Office responded to a home in the 3000 block of Cotton Creek Place for a report that Mclaughlin had aimed a gun at a 16-year-old and fired a single shot.

The three teenagers, in separate police interviews, told investigators that they had been walking in a neighborhood off Robertson Road.

Mclaughlin asked the teens if they knew what day it was, and later said, "Four-twenty, know where I can buy any weed?" He asked if they knew anyone who would trade an ounce of marijuana for the gun.

One of the teens received a phone call from his father, so he and another teen stepped away. As they walked away, the third teen was left alone with Mclaughlin.

Mclaughlin pocketed the gun, then pulled it back out and pointed it at the teen's head, telling the boy to empty his pockets.

"Back where I come from in Memphis, Tennessee, they do this," Mclaughlin told the boy. He then took a step back and fired one shot, with the bullet flying past the boy's right ear.

The other two teens returned to the scene, and Mclaughlin pressed the muzzle of the gun against another teen's chest.

Eventually they were able to leave and report the incident to authorities.

Mclaughlin was arrested, and police took possession of a .22 magnum handgun as well as additional ammunition.

Mclaughlin's blood-alcohol content was 0.166 at the time of his arrest. He told police that he had moved to Casper from Memphis in order to be with his child and ex-girlfriend, and that he was avoiding charges for attempted drug delivery.