NEW YORK - Wells Fargo & Co (WFC.N) will buy Prudential Financial Inc's (PRU.N) minority stake in retail brokerage joint venture Wells Fargo Advisors for $4.5 billion, the companies said on Tuesday.

The purchase is expected to be completed on or before December 31, the companies said.

Wells Fargo on Monday said it would buy the stake in cash instead of cash and stock as it planned earlier.

The move comes as Wells Fargo said separately that it will repay the entire $25 billion it received from the government under the Troubled Asset Relief Program, after raising $12.25 billion in a common stock offering.

Prudential and Wachovia Corp, which was acquired by Wells Fargo, combined their retail brokerages in 2003, with Wachovia taking a 62 percent stake in the joint venture and Prudential taking the rest.

In selling the stake, Prudential is exercising an option it received when Wachovia bought brokerage A.G. Edwards Inc.

(Reporting by Steve Eder; Editing by Gary Hill)