One of “The Office’s” longest-serving employees has reupped for another two-season hitch.

B.J. Novak has cut a deal with Universal Media Studios that covers his services as an actor and writer-producer on “The Office” through its seventh and eighth seasons. He’ll be upped to exec producer status (from co-exec producer) about halfway through the show’s upcoming seventh season. Pact also includes a development component for Novak to field new projects for the studio.

Novak was among the first thesps and scribes tapped for NBC’s redo of the offbeat BBC comedy. Like other multihyphenates on thelaffer, Novak’s “Office” roots run deep given his contributions on both sides of the camera. He directed his first episode of the show last season, and the new deal calls for him to helm at least two segs in the upcoming season.

Novak’s “Office” character, the weasely Ryan Howard, has been gone through a number of transformations on the show — a rags-to-riches-to-rags trajectory that has kept him a fan fave. With star Steve Carell announcing that he will depart Dunder Mifflin after the upcoming season, NBC and UMS were eager to ensure that Novak remains in the fold.

“B.J. has been an integral part of ‘The Office’ since the launch of the show,” said Angela Bromstad, prexy of primetime entertainment for NBC and UMS. “Whether he’s in the writing room or appearing on screen, we always get the smart, sophisticated, ridiculously funny humor from him that the fans have come to love.”

In addition to his “Office” labors, Novak earned kudos last year for his supporting role in “Inglourious Basterds.” His upcoming features include a voice-cast role in Columbia’s revival of “The Smurfs.”

Novak is repped by WME and manager Michael Price.