An allegedly tipsy dad left his baby boy stranded on a Bronx subway platform in the wee hours of Sunday morning while he snoozed on a No. 4 train, cops said.

Fortunately for the tot, who is about 18 months old, a good Samaritan happened by the Burnside Avenue station in University Heights around 3:45 a.m. and took the boy to the 46th Precinct station house.

A short time later, the boy’s father, 27-year-old Dondre Hunter of Staten Island, frantically flagged down cops at 125th Street and Lenox Avenue in Harlem, telling the officers he had fallen asleep after getting on the subway around 2 a.m. — and when he woke up, his baby was gone, police said.

Cops connected the dots and linked the father to the baby that was found at the University Heights station. Hunter was arrested.

The baby boy, whose name was not released, was taken to Bronx-Lebanon Hospital Center “out of an abundance of caution,” according to police, who said the child was ultimately deemed to be fine.

The panic-stricken mother, for whom cops had been searching, showed up at the hospital in tears just after 10 a.m.

“Can I see my baby? Please, I just want to touch him,” The Post overheard her pleading with officials. The mom was allowed to take the boy home shortly before 11 a.m.

She was also heard telling police that Hunter had taken their son to a party around 5 p.m. Saturday and his brother last heard from him around 1 a.m.

“His brother drove him to the train with the baby and he was supposed to bring the baby back home but they never made it back,” she said, adding that the brother alerted family that something was amiss.

Cops believe Hunter was intoxicated when he left the child behind, police sources told The Post.

The dad was held at the NYPD’s Transit District 4 station in Union Square and charged with abandonment of a child, a felony, and unlawful possession of marijuana, a violation.

Hunter was led from the station in handcuffs shortly before 6 p.m.

He had his head down but became enraged when reporters outside began asking him questions.

Hunter even tried to kick a news photographer at the scene.

“Get outta my face,” he snapped at a Post reporter.

“Have you heard from your wife?” the reporter asked.

“No,” Hunter replied. “Do you wanna die? I saw your face, n—-r.”

He was taken to Bronx Criminal Court and was awaiting arraignment Sunday evening.

The mother and several relatives declined to comment at Bronx-Lebanon Hospital and again at the family home on Staten Island on Sunday afternoon.

A social worker at the hospital on Sunday morning was overheard telling the mom that the city’s Administration for Children’s Services would be visiting the family’s home in the aftermath of the incident.

Additional reporting by Larry Celona and Jorge Fitz-Gibbon