A toddler was shot in the arm and his father was hit in the hand in a targeted shooting at a Brooklyn park Thursday afternoon, authorities said.

The 38-year-old father was at Herbert Von King Park on Lafayette Avenue in Bed Stuy at about 2 p.m. with his son, who turned 2 years old Thursday, when he was approached by two men, NYPD spokesman Paul Browne said. The father overheard one of the men saying, "That's him."

The father ran into a community center inside the park as gunshots were fired at him, according to Browne. Two shots were fired as he entered the center, and another shot was fired while he was inside.

He was struck once in the right hand and his son was struck in both arms, said Browne.

A police officer from the 79th Precinct, just a block away, witnessed one of the suspects running away. Police pursued the man and apprehended him inside the basement at 724 Lafayette Ave. He was being questioned.

Police were searching for the other suspect, and deployed a helicopter and heavy-weapons Emergency Services Unit teams in the area, Browne said.

Bullet shell casings were found on the scene, and investigation is ongoing. Police said it appeared to have been a targeted attack.

The father and son were were taken to Kings County Hospital, where they were undergoing surgery.