The tragic death of a 3-year-old girl who was locked inside a burning car in Queens has been ruled a homicide, police said Monday.

Little Zoey Pereira was inside the 2008 Audi sedan — which was chained shut — when it went up in flames shortly before 9 p.m. Sunday near Baisley Boulevard and 155th Street. She was rushed to Jamaica Hospital Medical Center but could not be saved.

Her 39-year-old father, from Valley Stream, was on fire as he ran from the scene, according to police sources and witnesses. He jumped into Baisley Pond to extinguish the flames.

The dad also was taken to Jamaica Hospital with second- and third-degree burns, sources said. The father, whose name was not immediately released, was later taken to Weill Cornell Medical Center in Manhattan and is now in police custody.

Officials had received a 911 call about a car stopped in the middle of the intersection. When authorities arrived, they noticed the inside of the car was on fire — and the windows on the fully engulfed sedan were closed, Deputy Chief Joseph Gallucci said at the scene. Investigators discovered one gas canister in the street and another in the back seat, sources said.

The incident, which is still under investigation, appears to have been related to a custody dispute.