LUBBOCK, Texas — A man accused of pointing a laser at a Texas Department of Public Safety helicopter, Joshua Pyle, 33, agreed to plead guilty to a federal charge on Monday, according to court records.

According to federal court records, a DPS helicopter was “patrolling certain areas of Lubbock” when it was “struck” by the beam of a green laser late at night near 82nd Street and Slide Road. The crew had to change course and the pilot had to look away to prevent eye damage. Court records said this created a hazard.

“The flight crew activated the on-board digital video recorder and began searching for the suspect who struck the DPS helicopter,” court records stated. It happened again just after midnight near 50th Street and Indiana Avenue.

After the DPS pilot reported the incident to police, Pyle got in his pickup truck and left the area. The DPS helicopter followed, and LPD officers initiated a traffic stop.

Court documents stated Pyle was “sweating profusely and breathing hard” during the traffic stop. When officers arrested Pyle, court records said the laser pointer was found in his pocket.

Pyle admitted to Aiming a Laser Pointer at an Aircraft, court records said. If a judge accepts his plea, Pyle will be sentenced at a later date to no more than five years in prison.