Dodge & Cox, among the largest mutual-fund companies that made a big bet on Fannie Mae (FNM) last year, has finally given up.

San Francisco-based Dodge & Cox sold the rest of the 63.59 million shares of the government-backed mortgage investor that it owned, according to a regulatory filing by Fannie Mae.

A Dodge & Cox spokesman declined to comment.

The fund manager disclosed in a securities filing in August that it owned about 120 million Fannie shares, or 12% of the total, up from 1.2% at the end of March last year. In August, Fannie shares ranged in trading from a low of $4.40 to a high of $13.60.

In early September, the mortgage titan and its sister company, Freddie Mac (FRE), were taken over by the government. In a move that wiped out shareholder value, federal regulators seized control of the management of the two companies under a conservatorship amid concerns about their capital reserves and growing losses on mortgages.

As of September 30, Fannie had 1.07 billion common shares.

Shares of Fannie Mae traded at 59 cents Wednesday, up 4 cents. Freddie shares were changing hands also at 59 cents, up 4 cents in New York Stock Exchange composite trading.

-By Aparajita Saha-Bubna, Dow Jones Newswires; 617-654-6729; aparajita.saha-bubna@dowjones.com

(James R. Hagerty contributed to this report.)