Fox won Wednesday night in the key demo thanks to their two-hour Gordon Ramsay programming block.

Kicking things off at 8 p.m. was “MasterChef,” which earned a 1.0 rating in adults 18-49 and 3.8 million viewers. That is up in both measures from last week. Then at 9, the series premiere of “Gordon Ramsay’s 24 Hours to Hell and Back” opened solid with a 1.1 and 3.7 million viewers. It was also Fox’s most-watched summer debut in over three years

Meanwhile on NBC, “American Ninja Warrior” (1.1, 5.1 million) dipped in the demo. “Reverie” (0.5, 2.4 million) held even.

CBS aired mostly repeats except for “Code Black” (0.7, 6.1 million), which ticked up from last week.

On The CW, a new episode of “The Originals” (0.3, 0.84 million) ticked up.

ABC aired only repeats.

Fox was first in the demo with a 1.0 but third in viewers with 3.7 million. NBC was second in the demo with a 0.9 but second in viewers with 4.2 million. ABC was third in the demo with a 0.6 but fourth in viewers with 2.5 million. CBS was fourth in the demo with a 0.5 but first in viewers with 4.8 million. The CW averaged a 0.2 and 738,000 viewers.