Davis Polk & Wardwell is staying in the midtown Manhattan building that has served as its headquarters since 1989 after resolving a four-month legal fight with the property’s owner over how much the firm should pay to renew the lease on the 22 floors of space it occupies there.

Papers filed in Manhattan Supreme Court on Aug. 13 show that a pair of lawsuits filed by Davis Polk against Lexington Operating Partners have been dismissed with prejudice and that the adversaries will pay their own costs. In one of the suits, the judge wrote that “the action has settled in accordance to a stipulation between the parties.”