Ending months of squabbling, Citigroup (C) and Morgan Stanley (MS) formally reached an agreement on Tuesday to value the firms’ Smith Barney brokerage at $13.5 billion.

The pact paves the way for Morgan Stanley to acquire Citi’s 14% stake in the joint venture and eventually take full ownership by June 2015.

The $13.5 billion figure represents a win of sorts for Morgan Stanley, which pegged Smith Barney’s price tag at just $9 billion, compared with Citi’s more lucrative estimate of $22 billion.

The deal comes a day after third-party consultant Perella Weinberg was due to finalize a report aimed at settling the Smith Barney valuation debate.

The two companies said the agreement includes the transfer of $5.5 billion of deposits at no premium.

Morgan Stanley owns 51% of Wall Street’s largest brokerage and has agreed to acquire Citi’s 49% stake in chunks. After acquiring the next 14% stake, Morgan said it will buy Citi’s remaining 35% investment no later than June 1, 2015 at the same $13.5 billion valuation.

“This mutually beneficial agreement gives both parties certainty and transparency on price and timing, and is a significant milestone for Morgan Stanley in the implementation of our strategy,” Morgan Stanley CEO James Gorman said in a joint statement.

Shares of Morgan Stanley jumped 1.87% to $16.92 Tuesday morning, nearly matching a 1.79% gain to $32.39 for Citi.

“I am pleased we have reached agreement on a value for our remaining stake in Morgan Stanley Smith Barney. Establishing certainty regarding the divestiture of this business is in the best interests of our shareholders,” said Citi CEO Vikram Pandit.

Follow Matt Egan on Twitter @MattMEgan5