Shining a laser light pointer at an aircraft is a dangerous thing to do, by all accounts.

But after two aircraft — including a Sheriff's Office helicopter — were targeted Wednesday night in Palm Beach County, deputies are also pointing out another stark fact: it's a felony.

James McDonald, a 52-year-old West Boca man, was reminded of this reality when he was arrested early Thursday after deputies said he flashed a green pointer at the cockpit of a Palm Beach County Sheriff's Office Eagle helicopter just before midnight.

Deputies on the ground found him, and now McDonald faces a charge of pointing a laser light at a pilot, records show. The crime is a third-degree felony in Florida.

According to an email from Sheriff's spokeswoman Teri Barbera, the helicopter crew was helping deputies on the ground as part of an investigation into another case, a robbery, that had happened nearby.

The two pilots in the chopper reported that they had been "disoriented" by a laser, according to an email from Barbera, citing deputies. The pilots saw a man standing in the back yard, in the 22800 block of Tradewind Road, and pointing a laser at them.

Deputies went to the property and spoke with the man, identified as McDonald. He said the noise had been bothering him, according to Barbera's email.

McDonald also said he didn't know it was illegal to point a laser at an aircraft, according to the Sheriff's Office. He also apologized.

Still, he was arrested and remained in custody Thursday evening, records showed.

The practice of shining laser light pointers at aircraft has become an "ongoing problem" in Palm Beach County, said a news release issued Thursday by the Sheriff's Office.

In fact, the Sheriff's Office said, a flight instructor who was flying a Cessna 172 over Palm Beach County also got the laser pointer treatment earlier on Wednesday, an incident that was reported to deputies at about 11:07 p.m.

The pilot, a flight instructor heading from Pompano Beach to Vero Beach, was at an altitude of 4,500 feet and about 6 miles west of Palm Beach International Airport when he "noticed a green laser beam shining into his Cessna 172 aircraft cockpit for a duration of a few seconds," the news release said.

A Sheriff's Office helicopter and deputies went to the area where the laser appeared to have originated, but the perpetrator wasn't found.

According to the Federal Aviation Administration, there were 1,541 reports nationwide of laser light pointers being aimed at aircraft between Jan. 1 and June 20 of this year.

In Florida, for that same time period, there were 172 cases, with 12 in Palm Beach, 34 in Broward, and 36 in Miami-Dade counties, according to FAA Southern Region spokeswoman Kathleen Bergen.

Nationwide, according to the FAA, the number of reported laser incidents in 2013 was 14 times higher than in 2005.