After struggling in the ratings this fall, Fox just received some very welcome news: Wednesday night’s hip-hop drama Empire has opened strong.

Blessed with an American Idol lead-in — yet also improving upon it — Empire premiered to 9.8 million viewers and a 3.7 rating among adults 18-49. That’s Fox’s highest-rated series debut in three years (since 2012’s Touch). Empire ranks as the top-rated show in the demo, beating ABC’s Modern Family head-to-head, and grew from its Idol lead-in by 19 percent. Empire outperformed Fox’s heavily hyped Gotham premiere this fall, and managed to retain its rating throughout its hour — another good sign (here’s our review).

As expected, Idol was another story. The music competition series had a downsized hour-long premiere at 8 p.m. that delivered 10.9 million viewers and a 3.1 rating — down 34 percent from last year and marking a series low for a premiere episode of the 15-year-old franchise. In other Idol news, Fox is making episodes available online for the first time.

Until now, Fox has had a very rough season trying to launch new hits. Gotham has performed quite well and has demonstrated stability — a rarity for a serialized drama. Yet its big reality experiment Utopia bombed, as did freshman dramas Red Band Society and Gracepoint, as well as new comedy Mulaney. Given its Idol lead-in, Fox likely felt Empire, which stars Terrence Howard as a music mogul, had the best shot at breaking out, plus was obviously a good thematic companion for its music competition series.

Also Wednesday: CBS’ The Mentalist (1.3) returned modest for its final season and tied the return of NBC’s Mysteries of Laura (1.3) at 8 p.m. ABC’s Goldbergs (2.5) had its second-best numbers ever, but Black-ish (2.1) dipped to tie its low. CBS had its People’s Choice Awards (1.8), down 25 percent this year.