The deal includes 16 medical office buildings in Greenville with about 856,000 square feet of space, Healthcare Trust said in a news release. The joint venture plans to immediately sell off three of the buildings, HCP said in an earnings report filed Thursday.

Healthcare Trust said that 99% of the property is leased, with Greenville Health System occupying about 95% of the space. HCP said the new owners have reached an agreement with Greenville Health System for a 10-year lease to begin at the closing of the transaction. The parties expect the deal to close by the end of August.

HTA acquired the buildings for $163 million in 2009 as part of a sale-leaseback transaction, the company said. Healthcare Trust of America CFO Robert Milligan said the transaction would allow the company to move capital and other resources into other markets.

“We were early investors in Greenville, with a great health system, and are pleased at the value that has been created during our period of ownership,” Milligan said in a statement.

The HCP and Morgan Stanley venture isn’t the first time the two companies have worked on a real estate deal. The latest deal, which involves $605 million of cash and property, adds to a portfolio of medical office buildings acquired in 2015 for $225 million, the company said.