OSLO (Reuters) - Norway’s $882-billion sovereign wealth fund, the world’s biggest, returned a profit in the third quarter thanks to strong stock markets, it said on Friday.

The fund earned a return of 4.0 percent in the quarter, or 240 billion Norwegian crowns ($29.7 billion), beating its benchmark by 0.2 percentage points. In the second quarter the fund booked a profit of 1.3 percent.

“Equity investments performed strongest during the quarter with positive returns in all regions. This was the main contributor to the fund’s results,” the fund’s deputy chief executive, Trond Grande, said in a statement.

The sovereign wealth fund invests the proceeds from Norway’s revenues from oil and gas production in foreign stocks, bonds and real estate. Its value corresponds to about $170,000 for every Norwegian man, woman and child.

The government withdrew 30 billion Norwegian crowns during the quarter to pay for public expenses at a time of declining oil and gas revenues, against 24 billion crowns in the second quarter.

The fund cut its share of fixed income investments in the third quarter to 36.3 percent of its portfolio from 37.4 percent three months earlier while equity investments rose to 60.6 percent from 59.6 percent.

Real estate holdings were maintained at 3.1 percent.