Sylvester Stallone has reached a confidential settlement with Warner Bros. in a dispute over profits from four films, including the 1993 action film “Demolition Man.”

Stallone filed suit in April 2017, claiming he had not received any profit participation from “Demolition Man” for a period of 18 years. Under his contract, Stallone was entitled to at least 15% of gross profits from the film.

The suit alleged that Warner Bros. stopped paying his profit participation in 1997, and did not resume until after he complained in 2014. The studio’s initial response was that the film was $67 million in deficit. The studio later acknowledged that Stallone was entitled to additional profits, and sent him a check for $2.8 million.

Stallone filed suit, alleging that he still had not been sufficiently compensated. Warner Bros. attorneys countered in June 2017, arguing that the suit was a “transparent attempt to grab some headlines and wring more money out of Warner on top of the millions of dollars of contingent compensation that (Stallone) has already been paid under the terms of the parties’ agreement.”

In 2018, Stallone amended the suit to allege that he had not received adequate payments for three other films: “The Specialist” (1994); “Cobra” (1986); and “Tango & Cash” (1989). The two sides have since been battling over discovery issues.

On Tuesday, the court was notified that the two sides have settled the dispute.

“The matter has been resolved,” Neville Johnson, who represented Stallone’s loan-out company, Rogue Marble Productions, told Variety.

A Warner Bros. spokesman was similarly tight-lipped: “The dispute has been amicably resolved.”