An FDNY firefighter had to bust a child out of a hot car in Queens on Thursday — breaking its driver-side window with a hammer — after the kid was locked inside and left unattended by his father, officials said.

“I was just there at the right time,” firefighter Matthew Clinton told The Post. “I could tell that it was really hot in the vehicle.”

Clinton, who is assigned to the fire academy, was with two trainees near a Target in College Point when he stumbled upon the 5-year-old boy — who was in a car seat.

“Walking to the parking lot and we noticed the child unattended,” Clinton recalled, noting how the boy was crying and sweating profusely. “The kid was very distraught. Tried to settle him…and a small crowd started to form.”

Thinking quick on his feet, the smoke-eater asked bystanders for something to bust out the window.

“I had asked everybody if they had a tire iron,” Clinton said. “A gentleman came and handed me a hammer.”

After shattering the glass, Clinton and the others got the boy out and tried to keep him calm until NYPD officers arrived.

“Police showed up soon after I broke the window, and a little while after that the dad came into the parking lot,” Clinton said. “He did look very concerned.”

Authorities arrested the man — Geremie Ram, 42, of Rochelle — and charged him with reckless endangerment and acting in a manner dangerous to a child, according to police officials.

He allegedly had Xanax on him at the time and was also charged with possession of a controlled substance. His son was treated at Flushing Hospital and expected to be okay.

The incident comes less than two weeks after a Bronx dad left his twin babies to die inside of a hot car. The man is facing manslaughter and criminally negligent homicide charges.

More than 50 kids died in the United States last year after being left unattended in hot vehicles, according to KidsAndCars.org.

Thursday and Friday are the most common days for the deaths to occur, the organization says.