TV Ratings: 'Modern Family' Beats 'X Factor' in Demo, Fox Wins Night

ABC's "Happy Endings" and "Suburgatory" premieres are solid.

On Wednesday, ABC's Modern Family won Wednesday night in the key demo, but Fox won the night overall.

STORY: Simon Cowell's 'The X Factor' Premieres Lower Than 'American Idol'

It's worth noting that broadcast had competition from cable as the Yankees and Red Sox both lost (to the Rays and Orioles respectively). ESPN aired Red Sox, while both YES and ESPN aired the Yankees.

Over on Fox, The X Factor rated 3.9 (11.5 million viewers). Modern Family was the top-rated show of the night with a 5.6 (13.2 million viewers), although down 8 percent from its premiere.

PHOTOS: Fall TV's 12 Most Anticipated Shows

(Last week, Modern Family beat X Factor in the demo as well. Modern Family rated a 6.0, while X Factor rated a 4.4. CBS' Criminal Minds was close, with a 4.1 rating.)

ABC and CBS tied for second place.

On ABC, The Middle was down 16 percent in its demo. The premiere of Suburgatory rated a 3.3, besting the premiere of Better With You last fall by 27 percent.The premiere of Happy Endings rated 3.2, off only 6 percent from established Cougar Town's premiere in the same time slot and date last fall. Revenge rated 2.7, down 18 percent from its series debut.

PHOTOS: Fall TV Death Pool: Which Shows WIll Be Axed First?

On CBS, Survivor: South Pacific stayed steady with a 3.1. Criminal Minds rated 3.6, down 12 percent. CSI rated 3.0, down just 6 percent.

PHOTOS: Behind the Scenes: THR's 'X Factor' Cover Shoot

Univision rated 1.8, beating NBC, which rated a 1.6. Up All Night rated 2.1, down 13 percent from last week. Free Agents rated 1.0, down 24 percent. Harry's Law was flat, with a 1.2 rating. Law & Order: SVU was down 17 percent with a  2.0 rating.

On the CW, the Kardashians gave H8R its most-watched episode of the season with 1.4 million viewers, up 50 percent in the demo (0.6). America's Next Top Model was up 6 percent in total viewers with 1.7 million and 14 percent in the demo (0.9.).

FOX - 3.9, 11.5 million viewers      
·         The X Factor: 3.9, 11.5 million viewers      

ABC  - 3.3,  9.3 million viewers      
·         The Middle:  2.6, 8.6 million viewers               
·         Suburgatory (P):  3.3, 9.8 million viewers      
·         Modern Family:  5.6, 13.2 million viewers               
·         Happy Endings (P):  3.2, 7.4 million viewers      
·         Revenge:  2.7, 8.6 million viewers      

CBS - 3.3, 11.6 million viewers              
·         Survivor: South Pacific:  3.1, 10.5 million viewers          
·         Criminal Minds:  3.6, 12.6 million viewers            
·         CSI:  3.0, 11.6 million viewers      

NBC - 1.6, 6.3 million viewers                 
·         Up All Night:  2.1, 5.3 million viewers              
·         Free Agents:   1.0, 3.1 million viewers             
·         Harry's Law:  1.2, 7.4 million viewers                  
·         Law & Order: SVU:  2.0, 7.1 million viewers        
CW - 0.7, 1.6 million viewers      
·         H8R: 0.6, 1.4 million viewers      
·         America's Next Top Model:  0.8, 1.7 million viewers; @LKPE