Down to its final four remaining contestants for 2011, Fox’s ”American Idol” gained approximately 5% in viewers week-to-week as it led the network to a Wednesday primetime victory.

ABC’s ”Modern Family” was the top-rated scripted offering among adults 18-49, but CBS finished second among the networks behind Fox.

According to preliminary nationals from Nielsen, ”Idol” (6.9 rating/20 share in 18-49, 22.4 million viewers overall) started strong at 8 p.m. against CBS’ ”Survivor” (3.0/9, 10.4 million), then soared to a 7.7 rating in its final 30 minutes from 9-9:30 p.m., despite competition from ”Modern Family” (4.2/11, 10.1 million).

CBS’ ”Criminal Minds” (3.3/8, 13.1 million) finished first in its second halfhour, from 9:30-10 p.m., ahead of Fox’s ”Breaking In” (2.4/6, 7.4 million) and ABC’s ”Cougar Town” (2.4/6, 6.1 million).

NBC, which struggled in its first two hours with ”Minute to Win It” (0.9/3, 3.0 million for a new episode at 8 p.m., 1.1/3, 3.5 million for a repeat at 9 p.m.), rallied to win the demo battle at 10 p.m. with ”Law and Order: SVU” (2.4/6, 8.0 million). ”SVU” finished ahead of CBS’ ”Criminal Minds: Suspicious Behavior” (2.1/5, 9.1 million) and a double dose of ABC sitcom ”Happy Endings” (1.6/4, 3.9 million for the pair).

ABC finished third at 8 p.m. with ”The Middle” (2.1/7, 7.2 million) and the season (if not series) finale of ”Better With You” (1.9/6, 6.0 million).

The CW at 8 p.m. aired a repeat of ”America’s Next Top Model” (0.5/2, 1.2 million), followed by a new episode (1.0/2, 2.0 million)

Preliminary 18-49 averages for the night: Fox 5.8/16, CBS 2.8/8, ABC 2.3/6, NBC 1.5/4, Univision 1.4/4, CW 0.7/2.

In total viewers: Fox 18.7 million, CBS 10.9 million, ABC 6.2 million, NBC 4.8 million, Univision 3.5 million, CW 1.6 million.