A Brooklyn father is going to prison after admitting Friday to getting off a Long Island Rail Road train at Hicksville in the middle of the night, leaving his 3-year-old son and 14-month-old daughter on board.

Gerard Hatch, 48, pleaded guilty to one count of endangering the welfare of a child. District Court Judge David McAndrews sentenced him to five months in prison.

Hatch appeared intoxicated to witnesses and police, prosecutors said.

His children were not harmed in the April 20 incident, which happened shortly before 4:30 a.m.

Prosecutors said Hatch has an extensive criminal record, and has served jail time for criminal contempt, third-degree assault, disorderly conduct and other crimes.

He was represented by the Nassau County Legal Aid Society, which does not comment on individual cases.

Invasive fish in Suffolk pond ... What's in store with the weather ... H.S. plays of the week  Credit: Newsday

Suozzi vs. Trump on 'slush fund' ... Rare tick virus on LI ... Let's Go: LIRR trip to nostalgic spots ... H.S. plays of the week

Invasive fish in Suffolk pond ... What's in store with the weather ... H.S. plays of the week  Credit: Newsday

Suozzi vs. Trump on 'slush fund' ... Rare tick virus on LI ... Let's Go: LIRR trip to nostalgic spots ... H.S. plays of the week

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME