A Brooklyn man was sentenced to 7 years in prison after pleading guilty to bringing a loaded, unlicensed pistol to Kennedy Airport in April 2015, Queens prosecutors said Thursday.

The weapon was discovered during a routine preflight scanner security check, Queens District Attorney Richard A. Brown said Brown said.

Aquil L. Dunbar, 22, of Bergen Street, pleaded guilty in July to one count of second-degree criminal possession of a weapon, prosecutors said. The charges followed an investigation by Port Authority police.

Authorities said the incident occurred about 3 p.m. on April 24, 2015, at Terminal 5. Brown said security agents discovered a .25 caliber pistol in the carry-on luggage belonging to Dunbar. The gun was loaded with six rounds of ammo, Brown said.

He said it was concealed inside a sock inside a shoe box inside a plastic bag.

Get the latest news and more great videos at NewsdayTV Credit: Newsday

Updated 44 minutes ago Suozzi vs. Trump on 'slush fund' ... What's in store with the weather ... Let's Go: LIRR trip to nostalgic spots ... H.S. plays of the week ... What's up on LI ... Get the latest news and more great videos at NewsdayTV

Get the latest news and more great videos at NewsdayTV Credit: Newsday

Updated 44 minutes ago Suozzi vs. Trump on 'slush fund' ... What's in store with the weather ... Let's Go: LIRR trip to nostalgic spots ... H.S. plays of the week ... What's up on LI ... Get the latest news and more great videos at NewsdayTV

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME