Years of legal battles that once pitted Leona Helmsley against her late husband’s partner will end Wednesday when the management and leasing of five buildings moves from Helmsley-Spear to the city’s top three firms.

On Oct. 31, a state appellate court upheld partnership votes that allowed Wien & Malkin to oust Helmsley-Spear by today and hire other firms.

Management and leasing for the Lincoln Building at 60 E. 42nd St. will be taken over by Newmark & Co. while Cushman & Wakefield will handle the Fisk Building at 250 W. 57th St. and the two International Toy Center buildings at 200 Fifth Ave. and 1107 Broadway.

Another building at 501 Seventh Ave. is about 50 percent occupied, and Insignia/ESG will oversee its transition from fashion to office tenants.