It’s been a good week for Fox Entertainment president Kevin Reilly.

First, he managed finally slay “‘Til Death.” Then, terrible singer Paige Miles got booted off “American Idol.” (Actually, we don’t know where Reilly stood on Paige — but as an exec with generally good taste, we assume he was happy to see the off-note singer exit the competish.)

Now, as first reported by Deadline.com, Reilly has sealed a three-year deal to remain at the network.

The reup doesn’t come as much of a surprise; Reilly’s on a roll this year. The network won the fall for the first time, thanks to some strong scheduling by his team — including the Thursday night duo “Bones” and “Fringe.” And Fox also boasts two of the year’s top-rated new series, “Glee” and “The Cleveland Show.”

Reilly has been at Fox since July 2007, having been recruited by his old FX boss, Peter Liguori (now at Discovery Communications) to take the entertainment prexy gig. 

Before that, he spent three years at NBC — from 2004 to 2007. He had just re-upped with NBC when the network suddenly brought Ben Silverman on board, forcing Reilly out the door. (He’s now been at Fox for three years and has just reupped. Hmm — Reilly, stay alert.)

Reilly’s well known for his creative chops, having championed shows like “The Office” at NBC and “The Shield” at FX. Pact also comes as his boss, Fox Chairman Peter Rice, is busy with expanded duties, having gained oversight of FX in January.

Here’s a rather wacky Reilly video from the 2005 upfronts: