As Aaron Judge came to the plate in the bottom...

Officer Jonathon Olivo of the Hudons County (NJ) Sheriff's office, rewards his dog Maximus, during training.

Law-enforcement K-9 teams across the region brushed up on their bomb-sniffing skills at an explosives-detecting boot camp in New Jersey earlier this month.

NYPD Lt. John Pappas was among those attending the ATF event in north Jersey — and knows firsthand the importance of the work.

Pappas is commanding officer of the Police Department’s Transit Bureau Canine Unit, and he and his bomb-sniffing K9, Palla, spend their days scouring the city’s subways for any sign of explosives and other dangerous activity.

The pair “does explosive sweeps in the subway on a daily basis,’’ Pappas told The Post. “We keep the riding public safe.

“We have the busiest mass transit system in the Western Hemisphere … 5.7 million people a day. That’s 2.3 billion people a year,” the cop noted.

Pappas and Palla were among the nearly 50 canine teams at the local, state and federal level who gathered for the training run by the federal Bureau of Alcohol, Tobacco, Firearms and Explosives.

The K9s and their handlers traveled to the old Meadowlands Racing Track between June 25 and 27 to become more acquainted with “pure uncontaminated explosive odors” created by ATF chemists in Maryland, explained ATF K9 Trainer and course developer Cody Monday.

“Those explosives are very sensitive to heat, shock and friction,” Monday said. “It’s something that normal K-9 handlers don’t get on a regular or consistent basis. … [We] offer that training to make sure that they can find those types of homemade explosives.”

The ATF also provided detailed information on the latest bomb-making trends and tactics while conducting the National Odor Recognition Training and Testing, in which the dogs underwent a “single blind, odor recognition test.”

During the test, agents placed the K9s, one at a time, in the middle of several identical containers in which explosive material might — or might not — have been hidden.

If the dog didn’t smell anything explosive, it walked to the next container. But if it detected something, its posture began to change.

“We introduce the dog to the odor and reward the dog, and you do that several different times, and then we kind of play a shell game,” Monday said. “We have the actual explosive and then we have distractor odors.

“We’ll put the dog on the actual explosive and then start doing negative stuff with the distractors before that, eventually moving the explosive all around the simulator.

“After several repetitions they’ll just find it. That’s what we call imprinting.”

When the K9 believes it’s found something, it sits and awaits its food or play reward.

K9 teams from across the northeast, including New York, New Jersey, Pennsylvania and Massachusetts, attended the program, which is conducted 12 to 14 times a year throughout the country.

Additional reporting by Stephanie Pagones