For the first time, a cable show is the top-rated scripted series on television — and we have zombies to thank. AMC's "The Walking Dead" was not only the highest-rated scripted show of the 2012-13 season, but the second highest-rated show overall, behind NBC's "Sunday Night Football."

It's a victory not just for cable, but for scripted TV. For nearly a decade, the reality competition "American Idol" was television's top-rated series. (It was only in 2011-12 that "Idol" was surpassed by football.)

Also read: 'Walking Dead' May Become TV's Top Scripted Show

TheWrap first reported in October of last year that "The Walking Dead" could become TV's top scripted show. Since then it has repeatedly broken its own viewing records, and surpassed every other show by "Sunday Night Football."

With all the numbers in, CBS's "The Big Bang Theory" was the second-highest rated scripted show, after "The Walking Dead," and the third highest-rated series overall.

Based on final Live + 7 numbers, which measure a show's viewership over the week after it airs, "Sunday Night Football" averaged an 8.2 rating in the key 18-49 demographic.

"Walking Dead" averaged a 7.5 rating, and "The Big Bang Theory" a 7.2.

"Walking Dead" wasn't the top scripted show, however, in total viewers. That was CBS's "NCIS," which averaged 22.7 million viewers of all ages per episode. "Sunday Night Football" averaged 21.4 million, and "The Big Bang Theory" averaged 21.1 million.

"The Walking Dead" demo win is especially bad news for broadcasters because it comes as their own ratings are down. ABC, CBS, Fox and NBC all slipped in the key demo this past season, and all but CBS were down in total viewers. CBS was up slightly.