A federal judge on Monday sentenced a man who pleaded guilty to slapping a crying toddler on an Atlanta-bound flight to serve eight months in federal prison.

Joe Rickey Hundley was accused of using a racial slur to refer to the 19-month-old boy, who’s black, and hitting him under the eye as the flight from Minneapolis descended to the Atlanta airport last February. He pleaded guilty in October to simple assault after reaching a plea agreement with prosecutors.

Prosecutors had recommended a sentence of six months in prison, and Hundley reserved his right to argue for a lower sentence. U.S. Magistrate Judge Alan Baverman said he imposed a higher sentence in part because of Hundley’s criminal history, which includes a prior assault.

Hundley’s lawyer, Marcia Shein, objected to the deviation from the recommendation in the plea agreement and said after the hearing that she believes the sentence is disproportionate.

Before he was sentenced, Hundley told the judge he took full responsibility for his actions and turned to apologize in person to Jessica Bennett, the toddler’s mother, who was in the courtroom.

Hundley, who lived in Idaho at the time, was on a Delta flight from Minneapolis to Atlanta on Feb. 8 and was seated in a window seat next to Bennett, who was sitting in the aisle seat and had her 19-month-old son on her lap, according to court filings.

As the plane descended into Atlanta, the child started crying. Hundley leaned over to Bennett and “told her to shut that (N-word) baby up,” according to a sworn statement from an FBI agent who investigated the incident. Bennett asked Hundley what he had said, and he leaned in with his face next to hers and said it again, prosecutors have said.

Hundley then slapped the child’s face, leaving a scratch below his right eye, the FBI agent’s statement says.

Hundley’s only son was in a coma in Atlanta after an insulin overdose that was the result of a suspected suicide attempt, Shein has said. Hundley had spent the prior day talking to his ex-wife and doctors after his son was declared brain dead, Shein said, and he booked a last-minute flight to Atlanta so he and his ex-wife could take their son off life support.

“I made the most terrible day in my life much worse for me and for others,” Hundley told the judge.

Bennett has said Hundley became increasingly obnoxious and appeared intoxicated during the flight.

Hundley has been attending Alcoholics Anonymous meetings every day since March, is undergoing 15 hours of counseling a week and has been helping others deal with alcohol problems, Shein said. Hundley told the judge that he shouldn’t have had any alcohol the day of the incident.

Shein argued that Hundley has taken positive steps to address his alcohol and anger issues and would be better served by house arrest or a halfway house.

Baverman said the case was difficult and emotional for everyone involved. He said he understands the grief Hundley was experienced and applauded the steps he’s taken, but called the previous assault and probation for an alcohol-related offense troubling.

“You cannot assault another individual, regardless of how sad or upset, or even how intoxicated or sick, you are,” Baverman said.

In addition to the prison sentence, Baverman ordered Hundley to pay Bennett restitution of $105 and to pay a fine of $2,500 to the government. Baverman also ordered Hundley to serve a year of supervised release, undergo alcohol abuse treatment and anger management counseling, and perform 120 hours of community service, preferably in a homeless shelter.

Hundley was not immediately taken into custody and will be allowed to report to prison once he gets an assignment. Shein said it was too early to decide whether to appeal.

Bennett gave an emotional statement to the court before sentencing, saying her son immediately changed from a bright and curious child to one who was guarded and scared. For her part, she suffered fear, anxiety and depression as a result of the attack, she said.

“It is my belief that Mr. Hundley is a bully,” Bennett told the judge. “He saw an easy mark in a woman with a young child to unleash his bigotry.”

Bennett said after the hearing that she was satisfied by the sentence and didn’t believe Hundley’s apology was genuine.