Wells Fargo & Co and Citigroup Inc repaid a total of $45 billion to the United States on Wednesday, as major banks look to reduce government influence over their affairs.

San Francisco-based Wells Fargo repaid in full the $25 billion it received in October 2008 under the government's Troubled Asset Relief Program. Citi repaid $20 billion, but taxpayers still own common stock in the bank that is now worth about $25.2 billion.

The banks were the last two major banks left in TARP. Most of their competitors repaid the United States in June.

Exiting TARP gives banks more say over areas including employee compensation and dividends.

Last week, Wells Fargo sold $12.25 billion in stock and New York-based Citigroup sold $17 billion in common shares and $3.5 billion in convertible notes to help repay the TARP money.

Citigroup received $45 billion under the U.S. Troubled Asset Relief Program last year over two separate bailouts. In a third bailout this year, the U.S. agreed to swap the Citigroup preferred shares it owned into $25 billion of common stock and another $20 billion of more debt-like securities.

The U.S. had planned to sell up to $5 billion of the stock it holds in Citi last week, but demand for the bank's sale was low enough that any government sale would have resulted in a loss for taxpayers.

The U.S. Treasury still holds warrants to buy about 110 million shares in Wells Fargo, that bank said. It paid dividends of $131.9 million to the government as part of the repayment, according to a statement earlier on Wednesday.

Wells Fargo shares fell 31 cents, or 1.14 percent, to $26.85 and Citigroup shares fell 1.5 percent, or 5 cents, to $3.29 on Wednesday.

(Reporting by Elinor Comlay and Dan Wilchins)