A sizable ratings advantage built early in the month is holding up nicely for NBC after three weeks of the May sweep.

Although Fox rode “American Idol” and “That ’70s Show” to its 18th consecutive Wednesday victory, the Peacock is looking good to win the month in the key adults 18-49 demo — even with boffo numbers still ahead for the two-hour “Idol” finale on the sweep’s closing night.

According to Nielsen, NBC is on top through Wednesday with a 5.0 rating/14 share in 18-49, followed by Fox (4.0/12), CBS (3.8/11), ABC (3.3/9), the WB (1.6/4) and UPN (1.2/3). Only NBC and CBS are up vs. a year ago at this time.

The Peacock also is setting the pace in adults 25-54 and adults 18-34.

Still up for grabs is the month’s total-viewer crown: NBC leads over CBS through three weeks (12.84 million to 12.41m) but the Eye still has the inside track, especially if two-part movie “Reversible Errors” performs decently on Sunday and Tuesday.

At the younger nets, the WB leads comfortably over UPN in adults 18-34 (1.9/6 vs. 1.2/4), but both are down 20% vs. last year.

On Wednesday, Fox led all four of its half-hours in 18-49 while the WB drama “Angel” ended its five-year run on a high and ABC’s “The Bachelor” performed well despite opposing “American Idol” for its first hour.

‘Idol’ dominant

“Idol,” one week from its third-season finale, dominated the 9 o’clock hour with an expanded results show that averaged a 9.8/23 in adults 18-49 and 22.42 million viewers overall. It tripled the demo score of NBC’s “West Wing” (3.1/7 in 18-49, 11.03m), which ended its season with a whimper.

From 8 to 9, two segs of “That ’70s Show” averaged a strong 5.8/17 in 18-49 and 11.81 million viewers overall, roughly doubling second-place ABC’s “My Wife and Kids” (3.0/10 in 18-49 for an original and 2.9/8 for a repeat).

The two-hour finale of “The Bachelor” with New York Giants quarterback Jesse Palmer was sacked by “Idol” in its first hour but still finished with a strong 6.0/15 in 18-49 and 13.07 million viewers. It gave ABC its largest Wednesday aud from 9 to 11 since February and its best adults 18-34 score (6.2/17) since December.

From 10 to 11, “The Bachelor” won out in 18-49 over the season finale of NBC’s “Law & Order,” which put up a good fight with one of its strongest perfs of the season (6.5/16 in 18-49, 19.46m).

At the WB, the series finale of “Angel” (2.9/7 in 18-49, 5.32m) ascended to its biggest Nielsens in at least two seasons, placing second at 9 to “Idol” in men 18-34 (4.0/12). Lead-in “Smallville” ended its third season (2.7/8 in 18-49, 5.92m) with its highest 18-49 result since November.