Matthew Perry is returning to NBC.
After lengthy negotiations, the former Friends star will join D.L. Hughley and Steven Weber in an untitled drama set behind the scenes at a fictional long-running sketch-comedy series in the mold of Saturday Night Live.
Perry will play a genius comic writer who was forced out of his position as co-executive producer on the sketch show after a dispute with the network, UBS. Weber will play UBS' ambitious chairman, and Hughley one of the sketch show's three stars.
Aaron Sorkin, who created the project with Thomas Schlamme, wrote Perry's part with the actor in mind.
"A lot is going to be asked of this cast," Sorkin and Schlamme said. "We still have a number of roles to fill to complete the ensemble, but you couldn't hope for a better start than these incredibly gifted actors."
Written by Sorkin on spec, the drama ignited a bidding war between NBC and CBS that resulted in a monster deal with NBC said to include a fee of more than $3 million for the pilot.
The project, previously known as Studio 7, reunites Perry with Sorkin and Schlamme after the actor's guest stint on The West Wing earned him Emmy nominations in 2003 and 2004.
Perry was in high demand this pilot-casting season, with a number of projects at various networks courting him for the lead. He is the third Friends star to return to series television after Matt LeBlanc's turn in the ratings-challenged Friends spinoff Joey and Lisa Kudrow's starring role on HBO's short-lived The Comeback.
Perry next will be seen in the title role of TNT's based-on-a-true story TV movie The Ron Clark Story, slated to air in August.