Cambridge Bancorp is merging with Wellesley Bancorp, including the firms’ wealth management operations, the companies say.

Cambridge, Mass.-based Cambridge has entered into a definitive agreement to merge with Wellesley, Mass.-based Wellesley in an all-stock transaction valued at $122 million in aggregate, according to a joint press release from the two firms.

The deal is scheduled to close in the second quarter of 2020 pending regulatory and shareholder approval, the companies say.

Wellesley had around $363 million in wealth management assets as of the end of September, according to the press release.

The 129-year-old Cambridge Trust Company, the firm’s private banking and wealth management business, oversees $3.3 billion in client assets under management and administration from an office in Boston as well as three offices in New Hampshire, the companies say.

The merger will also add Wellesley’s banking operations, which includes six full-service banking offices in Massachusetts and $986 million of total assets, $833 million of gross loans and $759 million of deposits, according to the press release.

The combined entity is projected to have more than $3.8 billion in assets, $3 billion in gross loans, $3.2 billion in deposits, and $3.6 billion of wealth management assets, the companies say.

After the merger, three Wellesley directors will join Cambridge’s board of directors, according to the press release.