Ocwen Financial Corp.’s deal to acquire PHH Corp. for $360 million will bring together two companies in the midst of resurrecting their businesses after a string of regulatory and financial setbacks.

Here’s a look at three key reasons the acquisition makes sense for both sides:

Accelerate subservicing transformation

After the deal’s expected close in the second half of 2018, the combined company will service 1.9 million loans with an unpaid principal balance of $328 billion. It will also give Ocwen stronger portfolio defense capabilities because of its retail mortgage lending business. In announcing the deal, Ocwen trumpeted the fact it would have the capability to originate over $3 billion of both forward and reverse mortgages.

Ocwen said it will pay PHH shareholders $360 million, or $11 per diluted common share, which is a “35% discount to PHH’s GAAP book equity at December 31, 2017.” It will also assume $119 million in PHH corporate debt. But PHH has $260 million in cash on its balance sheet that Ocwen will be able to use to fund the deal. Taking all of that into account, the actual cost for Ocwen to acquire PHH is roughly $219 million — and that’s before any cost savings from reducing overhead, restructuring debt and improved economies of scale.

“This decision follows a comprehensive assessment of the risks and opportunities associated with operating the business and the strategic alternatives available to us,” PHH Corp. President and CEO Robert Crowl said in a PHH press release.

Both companies have been working to revitalize their businesses by focusing almost exclusively on subservicing. Ocwen also disposed of its correspondent lending business and said it entered into agreement to sell its wholesale production unit to an undisclosed buyer. It is still evaluating an exit from the reverse mortgage lending business.

PHH’s subservicing strategy emerged after it lost several major private-label origination clients; it also sold its joint venture with Realogy (a former sister company) to Guaranteed Rate.

By focusing solely on subservicing, PHH’s only origination business would have been defending its subservicing portfolio. And the “PHH 2.0” transformation was quite costly; the company reported quarterly losses totaling $217 million in 2017, including $49 million in the fourth quarter and $55 million in the third quarter.

The changes in the tax code cost PHH $30 million during the fourth quarter, and it also incurred $31 million in pretax losses from the private-label servicing business that it is exiting, PHH reported after the acquisition was announced. It also had favorable pretax items totaling $16 million. PHH also paid $38 million of its $45 million settlement with state regulators and separate consent order with state attorney generals during the quarter.

Ties to New Residential

Ocwen’s shift to subservicing has come primarily through selling mortgage servicing rights it controls to New Residential Investment Corp., a real estate investment trust that invests in MSRs, but generally subservices the actual work of managing mortgage accounts.

Ocwen and PHH are New Residential’s third- and fourth-largest subservicers. Ocwen has only $3.7 billion of its subservicing unpaid principal balance that’s not connected to New Residential. It serviced $78.3 billion on its own behalf and $105.6 billion of loans sold or being sold to New Residential at the end of third quarter 2017.

Meanwhile, about 58% of PHH’s subservicing portfolio is MSRs owned by New Residential. The unpaid principal balance of PHH’s entire servicing portfolio was $148.2 billion at year-end, with subservicing accounting for more than 90%.

While Ocwen won’t leapfrog New Residential’s other subservicers, the PHH deal with make it a closer No. 3 counterparty during a critical time for the two companies ahead of it.

Nationstar Mortgage Holdings is New Residential’s largest subservicer and the two companies share ties to Fortress Investment Group. But with Nationstar and its lender/servicer Mr. Cooper being sold to Washington Mutual’s successor, the shared investor relationship will soon go away. And Ditech, New Residential’s No. 2 subservicer, recently emerged from a bankruptcy restructuring and has a new CEO.

New Residential also owns a roughly 5% stake in Ocwen. The servicer’s common stock surged more than 10% during after-hours trading following the PHH announcement. Ocwen reports fourth quarter 2017 and full-year financial results on Feb. 28.

While Ocwen will strengthen its ties to New Residential, acquiring PHH will also let it diversify its subservicing portfolio with the addition of other MSR owners. Likewise, New Residential is buying Shellpoint Partners, parent company of New Penn Financial. While there is a subservicing component to that deal, New Residential plans to continuing working with its current subservicing partners, New Residential CEO Michael Nierenberg said at the time.

Overcoming regulatory obstacles

Ocwen’s troubles have been driven largely by years of regulatory scrutiny over its handling of loss mitigation and foreclosures, including a series of lawsuits spearheaded by the Consumer Financial Protection Bureau and regulators from about 30 states. It has steadily been chipping away at those claims through a series of settlements. After an agreement announced earlier this week with Maryland regulators, Ocwen only has to resolve claims from regulators in Connecticut, Florida and Massachusetts, as well as the CFPB.

By acquiring PHH, Ocwen can more quickly migrate to Black Knight’s LoanSphere MSP servicing system of record, a condition of many of its regulatory settlements.

“This transaction gives us the opportunity to migrate to their [PHH’s] existing Black Knight LoanSphere MSP servicing platform more quickly and with less risk than had we just implemented the system ourselves,” Ocwen President and CEO Ron Faris said in an Ocwen press release.

The deal will give Ocwen “a superior foundation” to enable it to resume new business and growth activities in order to offset runoff in the servicing portfolio, the release adds.

PHH has been at the center of a lawsuit involving the constitutionality of the CFPB. In January, the U.S. Court of Appeals for the D.C. Circuit affirmed a lower court ruling throwing out a $109 million fine imposed by the CFPB against PHH, alleging PHH engaged in a kickback scheme with a reinsurer.

PHH had sued in part over the fine, but also claimed the CFPB’s leadership structure and funding outside the congressional appropriations process were unconstitutional. Ocwen made the same constitutionality challenge after it was sued by the CFPB.

The case was remanded back to the CFPB for acting Director Mick Mulvaney to set a new fine. While it has so far appeared unlikely that PHH would appeal the court’s ruling, it’s now unclear whether Ocwen would consider resuming the constitutionality battle from the PHH case to bolster its own case with the CFPB.

Kate Berry contributed to this report.