Follow CBSMIAMI.COM: Facebook | Twitter

PANAMA CITY (CBSMiami/AP) — A Florida Panhandle man is going to jail for life.

READ MORE: City Of Miami Unveils Interactive Kiosk To Help Visitors Navigate Wynwood

27-year-old Gene Anthony Quinones-Rivera will spend the rest of his life in prison for killing his 2-month-old son by stuffing a sock in his mouth to stop him from crying.

The News Herald reports Quinones-Rivera pleaded no contest to the 2015 death on Monday.

A judge in Panama City gave him the maximum sentence for second-degree murder.

READ MORE: Child Tax Credit: How Much Money Will The IRS Send You Each Month?

The investigation began in December when Quinones-Rivera went to police and confessed that he’d caused the death of his son.

In an interview with the newspaper in January, Quinones-Rivera said he smoked marijuana that night and was angry because the child wouldn’t stop crying.

The court recommended that Quinones-Rivera be placed in a prison in South Florida.

MORE NEWS: Broward Receives Federal Funding For Its Emergency Rental Assistance Program

(© Copyright 2017 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)