(Reuters) - Morgan Stanley plans to bring its mortgage origination business in-house to improve customer service and generate more business, two people familiar with the matter told Reuters on Friday.

FILE PHOTO: The corporate logo of financial firm Morgan Stanley is pictured on the company's world headquarters in New York, U.S. April 17, 2017. REUTERS/Shannon Stapleton/File Photo

The change comes ahead of the bank’s third-party provider, PHH Corp, exiting the origination business next year, and as Morgan Stanley makes a bigger push into mortgages.

Although it will soon begin handling the early stages of mortgage lending, Morgan Stanley will continue to use PHH for other functions like mortgage servicing, said the sources, who were not authorized to speak to the press.

Representatives for Morgan Stanley and PHH declined to comment.

Morgan Stanley got into consumer lending more aggressively after finalizing its purchase of the Smith Barney brokerage from Citigroup Inc in 2013. The deal came with a slew of deposits that Morgan Stanley had to start lending out to generate profits.

While lending has increased 50 percent over the past four years, largely through securities-based loans, only 2 percent of Morgan Stanley’s wealth management customers have mortgages from the bank.

Mortgage originators work directly with borrowers to gather documents, submit loan applications and monitor the time-consuming and paperwork-heavy process through completion. Delays or errors can frustrate borrowers trying to lock in a better rate or buy a home in a hot real estate market.

Morgan Stanley executives hope that handling originations in-house will smooth out the process and give the bank a chance to market other products and services to wealthy clients, the sources said.

Other lenders including Bank of America Corp have moved away from outsourcing mortgage originations for the same reasons.

Morgan Stanley said last year it would review its relationship with PHH when its contract expires in October. The bank is adding the back-office operations and underwriting staff needed for origination functions.