A Stoughton man pleaded guilty Tuesday in Rock County Court to neglecting a child when he crashed in Janesville while intoxicated and left an infant alone in the car, covered with glass.

Judge Barbara McCrory adopted the plea and sentencing agreement for Tony O. Long, 25, and sentenced him to a one-year prison term that will run concurrently with a case from Columbia County.

Less than 24 hours before the early morning July 30 crash near the roundabouts at Racine Street and Interstate 90/39 in Janesville, Long was sentenced in Columbia County to probation with an imposed and stayed two-year prison term if he violated his probation on a cocaine delivery conviction.

In Rock County Court, Long pleaded guilty Tuesday to felony neglecting a child and no contest to operating while intoxicated as a first offense with a passenger younger than 16 in the car.

Police have said that Long flagged down another car and got a ride to a gas station after the crash. While there, he realized he had left his daughter in the car and returned to the scene.

The baby, who was checked out at a hospital, was unharmed in the crash.

Assistant District Attorney James Woywod said the incident left the baby in serious danger. He also brought up the impact on the child’s mother and what she was likely feeling when it happened.

McCrory said Long was lucky the crash didn’t kill someone, which is a possibility, especially when a driver is intoxicated.

Defense attorney Matthew Lantta said Long “clearly has substance abuse problems.”

He pointed to how his client took responsibility for the incident even before blood test results came back for the intoxicated-driving charge.

Lantta said many people reached out about Long’s case, hoping he can get the help he needs on substance abuse issues.

He said Long is aware that state prisons are seeing more problems from COVID-19 than they were earlier in the pandemic.

Long did not offer a statement in court Tuesday.

He is scheduled for a restitution hearing at 1:15 p.m. Dec. 9. Lantta said Long is willing to pay whatever is requested, but they need time to confirm the final amount.