Christopher Meloni and Mariska Hargitay have finally sealed a deal that will keep them on “Law and Order: Special Victims Unit” for the next two seasons.

Also, NBC said Christine Lahti is set to guest star in next season’s first four episodes of “SVU,” while former series regular Stephanie March, who plays ADA Alex Cabot (and returned on a limited basis last season), will once again show up on the drama starting with episode five, for at least 10 episodes.

Meloni and Hargitay are believed to have secured a payday at just below $400,000 an episode — slightly up from the approximately $375,000 each was making under their most recent deal. Although Meloni and Hargitay were also believed to also be asking for a single point of profit participation in the show, that wasn’t believed to be included in the final deal. All sides were mum on the specifics of the two-year pact late Monday.

Talks between the thesps and “SVU” producer Universal Media Studios broke down in the spring over the contract, but heated up again about three weeks ago.

Even without a deal in place for Meloni and Hargitay, NBC picked up its Tuesday stalwart for an 11th season. At the time, execs made no bones about the fact that the show would go on with or without its anchor stars.

Longtime “SVU” showrunner Neal Baer also signed on to remain in charge of the show next season.

Meloni and Hargitay have starred in “SVU” since its 1999 launch. Hargitay, who had suffered a partially collapsed lung last season — leading to surgery and, later, a second hospitalization — had been asking for work flexibility to be written into her contract.

Meloni and Hargitay ultimately joined forces and put forth similar contract demands.