ABC News and the Huffington Post stepped in it Thursday morning when they pushed breaking news alerts alleging a former police officer had been sentenced to 20 years in prison for the 2015 shooting death of Walter Scott, an unarmed 50-year-old black man.

The weird thing about this particular media bungle is that both newsrooms reported something that ultimately proved correct. They just spoke too soon.

“Judge rules ex-police officer Michael Slager committed murder in 2015 shooting of unarmed black man. He was sentenced to 19 to 24 years in prison,” read an ABC News alert published at 10:26 am ET.

The Huffington Post was close behind, publishing an alert roughly 30 minutes later that read, “The ex-cop who was shown fatally shooting Walter Scott, an unarmed black man, in an explosive video has been sentenced to 19 to 24 years in prison.”

At the time these alerts were published, this information was not accurate. The hearing had not been concluded, and the years mentioned by ABC and the Huffington Post were actually part of the judge’s discussion on how the sentencing guidelines could be applied.

ABC and HuffPo quickly issued corrections.

The former reported, “Correction: Former South Carolina police officer Michael Slager faces 19 to 24 years in prison for shooting death of Walter Scott.”

“Correction: The ex-cop who killed Walter Scott will face between 19 and 25 years in prison, but has not yet been sentenced, as previously reported,” read the latter.

It wasn’t until later, at around 12:17 pm ET, that an actual sentence was handed down: Michael Slager was given 20 years on Thursday.

"No matter what sentence I give, neither the Scott family nor the Slager family is going to like it or think it's right,” U.S. District Judge David Norton said prior to testimony.

Regarding the sentencing and the time Slager has already spent in jail, the Post and Courier reported the former cop, “will likely get credit for the more than a year he has already spent in jail. But federal prison system does not have parole, so barring a successful appeal, he will likely spend more than 18 additional years in prison.”

The sentence comes after four days of arguments from experts, attorneys, investigators, and witnesses.

"This is the most serious offense that we have," Norton said prior to announcing the sentencing. "Judging by the history and characteristics of the defendant, he has lived a spotless life. Regardless, this is a tragedy that shouldn’t have happened."

Slager will be in his 50s by the time he gets out of prison.

So, no, ABC and the Huffington Post weren’t wrong Thursday. They just got ahead of themselves.