Fox and CBS competed in a close race for first place in the Wednesday night ratings, with X Factor and Criminal Minds sharing the night's top numbers but CBS eking out an overall victory for the night, according to preliminary numbers.

Both X Factor, on Fox from 8 to 9:30, and Criminal Minds, on CBS at 9, drew a 3.4 rating/9 share in the adults 18-49 demographic, though Criminal Minds was easily the most-viewed program of the night with 12.7 million total viewers, compared to 10.6 million for The X Factor.

CBS took the win thanks to strong performances from Survivor and CSI, which took the third and fourth-place spots, respectively. Survivor at 8 drew a 3.1/9 with 10.7 million total viewers, while CSI at 10 surged 20 percent over last week, taking a 3.0/8 -- its best showing since the second week of the season -- and 12.1 million total viewers. Combined with Criminal Minds, those numbers gave CBS an average 3.1/8 in the demographic, narrowly besting Fox's 3.0/8 average. CBS was also the most-watched network of the night with an average 11.8 million total viewers.

Following The X Factor, Fox ran I Hate My Teenage Daughter, which pulled a 1.9/5 and 5.2 million total viewers. Overall the network averaged 9.3 million total viewers over the night.

ABC's Barbara Walters: 10 Most Fascinating People of 2011 at 9:30 was down 28 percent compared to last year's telecast with a 2.3/6 and 8.3 million total viewers.

ABC ran repeats the rest of Wednesday night, and NBC ran repeats throughout the evening.