One week after opening to decent numbers, NBC drama “Hannibal” held up well in its second outing Thursday — opposite repeats on the competition — and continues to look better than other recent shows to air in the night’s closing hour for the Peacock.

With CBS airing all repeats, Fox won the night with a rising “American Idol” and “Glee,” the latter of which got a boost out of its school-shooting episode.

According to preliminary national estimates from Nielsen, “Hannibal” averaged a 1.6 rating/5 share in adults 18-49 and 4.3 million viewers overall in the 10 o’clock hour, topping in demos the encores of both CBS’ “Elementary” (1.4/4 in 18-49, 7.3 million viewers overall) and ABC’s “Scandal” (0.9/3 in 18-49, 3.6 million viewers overall). The new Bryan Fuller-created drama matched its week-ago averages and grew from its first half-hour to its second (1.6 to 1.7). And since these prelim “Hannibal” numbers include a 1-minute runover from low-rated comedy “Go On,” the drama’s demo score could round up to a 1.7 in the nationals.

The only drama this season to match or exceed its premiere score in week 2 was Fox’s “The Following.”

NBC could certainly use a scripted hit, and “Hannibal” could carry its momentum to next week when it will again face repeats of “Elementary” and “Scandal.” Starting next week, and for the final five weeks of the television season, “Hannibal” will get stronger lead-ins than it has been getting from “Go On,” as the net will air original episodes of “The Office” and “Parks and Recreation” in the 9 o’clock hour.

The 1.6 rating for “Hannibal” in its first two weeks is the best for a regular Thursday 10 p.m. program since the early weeks of “Awake” in March of last year. That show opened to a 2.0 and then dropped to a 1.6 in its second week, when it had a 1.7 lead-in — vs. just a 1.1 lead-in this week for “Hannibal.”

Earlier for NBC, “Community” edged up (1.2/4 in 18-49, 3.0 million viewers overall), while “Parks and Recreation” (1.5/5 in 18-49, 3.1 million viewers overall), “The Office” (1.9/5 in 18-49, 3.8 million viewers overall) and “Go On” (1.1/3 in 18-49, 2.7 million viewers overall) were either steady or up a bit from last week when they all faced originals on CBS and ABC. This was the season finale for “Go On,” whose status remains up in the air for next season.

Elsewhere Thursday, Fox’s “American Idol” (3.1/10 in 18-49, 12.7 million viewers overall) won the opening hour and was the night’s top-rated program overall, growing 7% from last week for its best results-show demo average in four weeks and its largest overall audience on the night in five weeks. It was followed by “Glee” (2.4/6 in 18-49, 6.8 million viewers overall), which led its hour in under-50 categories and grew 20% from its most recent original. This was the best retention of “Idol” to date for “Glee,” which also matched the music contest in adults 18-34 and built on it by 15% in women 18-34.

Fox easily won the night in demos, taking three of its four half-hours, and also led in total viewers.

CBS hung in there with its all-repeat lineup, led as usual by “The Big Bang Theory” (2.9/10 in 18-49, 11.1 million viewers overall), which beat “Idol” head-to-head in 18-49 and was Thursday’s No. 1 broadcast in men 18-49 (2.5/9). The net placed second in 18-49 the rest of the way with “Two and a Half Men” (2.0/6 in 18-49, 8.2 million viewers overall), “Person of Interest” (1.8/5 in 18-49, 10.0 million viewers overall) and “Elementary” (1.4/4 in 18-49, 7.3 million viewers overall).

At ABC, “Wife Swap” (1.4/5 in 18-49, 4.6 million viewers overall) grew a bit, and likely benefited from the lower ratings for the CBS comedy hour. It was followed by encores of “Grey’s Anatomy” (1.3/3 in 18-49, 4.4 million viewers overall) and “Scandal” (0.9/3 in 18-49, 3.6 million viewers overall).

CW aired repeats of “The Vampire Diaries” (0.3/1 in 18-49, 1.0 million viewers overall) and “Beauty and the Beast” (0.3/1 in 18-49, 0.9 million viewers overall).

Preliminary 18-49 averages for the night: Fox, 2.7/8; CBS, 1.9/5; Univision, 1.6/5; NBC, 1.5/4; ABC, 1.2/3; CW, 0.3/1.

In total viewers: Fox, 9.8 million; CBS, 9.0 million; ABC, 4.2 million; Univision, 3.9 million; NBC, 3.5 million; CW, 0.9 million.