Sun Healthcare will continue to operate and occupy 23 long-term care facilities, as well as seven other healthcare properties, under an agreement finalized with Omega Healthcare Investors on Tuesday.

In all, 51 properties are owned by various Omega subsidiaries and leased to Irvine, CA-based Sun, one of the largest long-term care providers in the country. The companies had reached an agreement in principle on the deal near the end of January.

Timonium, MD-based Omega is a Real Estate Investment Trust investing in and providing financing to the long-term care industry. At the end of last year, the company owned or held mortgages on 211 skilled nursing and assisted living facilities, with approximately 21,500 beds located in 28 states and operated by 39 third-party healthcare operating companies.