When all was said and done with the “Mad Men” dealmaking, Matt Weiner emerged with a luxury afforded very few showrunners: a clear end date for his series.

Weiner is now plotting the saga of Don Draper and Co. to play out over another three seasons, per the terms of the rich $30 million pact that he reached Thursday afternoon with AMC and Lionsgate TV.

He’s eager to get back to work. Weiner plans to open the “Mad Men” writers room in about a month and is targeting a July start for lensing on the fifth season, which will be delayed until March because of the lengthy license fee talks between AMC and Lionsgate and the cabler and studio’s parallel negotiations with Weiner.

“I feel so lucky that I get to do this, and that I get to finish the story,” Weiner told Variety. “It’s terrific to have the security and not have to worry every year that I’m not going to have to go through (negotiations) again.”

Talks among AMC, Lionsgate and Weiner’s camp had been on-again, off-again since last summer. AMC and Lionsgate offered Weiner a package that will make him one of TV’s highest-paid showrunners but also pushed for concessions to squeeze more revenue out of the show, including containing the budget for the show’s large ensemble cast and cutting two minutes of running time out of each seg to make room for more ads.

The sides compromised by agreeing to let each season opener and finale seg run 47 minutes, which has been the show’s standard, but the 11 episodes in between will run on air at the 45-minute length sought by AMC. However, the segs will still be produced at 47 minutes and will run in full on VOD, digital platforms and DVD. (There’s been chatter about Lionsgate cutting a Netflix streaming deal for “Mad Men” but that could not be confirmed.)

Lionsgate had pushed for a $1.5 million reduction per season in the show’s cast budget, in anticipation of bigger paydays to come for key stars, including Jon Hamm, January Jones and Elisabeth Moss. The studio ultimately backed down from that demand, but insiders said there’s an understanding that producers will have to be creative and judicious with the cast budget going forward. It may also signal that even the topliners will have a hard time demanding mega-raises for season six and beyond.

AMC had pushed for more flexibility in product integration on the show. Insiders said there’s an understanding that advertisers will have greater leeway to flaunt their association with the show, possibly through custom blurbs tied to “Mad Men” content that AMC can sell at a premium.

As the negotiations for the show and the showrunner dragged on, AMC finally bit the bullet on Tuesday and announced that “Mad Men’s” fifth season would be delayed to March. Weiner said that he was told AMC made that decision last October because the cabler has four other original series to roll out this year (which AMC has disputed).

He’s not happy about the 17-month delay between season four and season five but he’s pretty confident “people will wait for it — I’ll do my damndest to make it good.”

Although there was much finger-pointing as tension flared this week, Weiner said Thursday he is gratified by the outcome with the cabler and studio, and “blown away” by the outpouring of support from the show’s fans. Now the famously neurotic scribe is looking forward to returning to his painstaking crafting of the period drama that he nurtured as a spec script for years before it saw the light on AMC in 2007.

The ability to map out the story of Sterling Cooper over three more seasons gives the scribes strong parameters to work with (akin to the agreement “Lost” stewards Damon Lindelof and Carlton Cuse reached with ABC in 2007) but “it’s also a tremendous responsibility,” Weiner noted. “When we get to the dessert, you want to leave everybody with a wonderful taste.”

Weiner’s deal was hammered out by his reps at CAA, attorney Jeanne Newman of Hansen Jacobson and manager Keith Addis. Attorney Jim Jackoway of Jackoway Tyerman repped AMC in the talks with Weiner and the negotiations with Lionsgate.