Gold Fields, the fourth-largest gold producer in the world, said Friday it swung to a profit in the three months ended in December as sharply higher gold prices and improved cost control offset lower production.

The Johannesburg, South Africa-based company earned $336 million, or 47 cents a share, in the fourth quarter of 2011, up 27 percent from the previous quarter. In the fourth quarter of 2010 it lost $106 million.

The company cut operating costs to $656 million in the fourth quarter compared to $766 million in the quarter before.

Total cash costs, per troy ounce, decreased to $767 from $851 in the three-month period.

Production in the fourth quarter fell two percent to 883,000 ounces.

The average U.S. dollar gold price, per troy ounce, in the quarter was off about one percent to $1,684, said Reuters, but the South African currency on average was 13 percent weaker against the greenback during the quarter resulting in a 12 percent gain in the price of gold -- in terms of the South African currency.

For all of last year Gold Fields earned $973 million compared with $153 million in 2010, benefitting from a 29 percent price increase over the 2010 level.

Gold Fields ADRs fell 36 cents, or 2.2 percent, to $16 in afternoon trading.