The California Public Employees’ Retirement System, the largest U.S. pension, had a 12.5 percent gain on investments for the fiscal year ended June 30 as global stock indexes rose to records.

Known as Calpers, the $262 billion fund earned 19 percent on its publicly traded equity holdings, according to Chief Investment Officer Joe Dear. He reviewed the figures today at a meeting of the system’s governing board in Petaluma, California.

Separately, the California State Teachers’ Retirement System, the second-biggest pension, said it earned 13.8 percent in the same period, Michael Sicilia, a spokesman, said in a telephone interview.

Calpers assets passed a pre-recession high of $260.6 billion in May, five years after the global financial crisis wiped out more than a third of its value. Local governments and state agencies have been forced to help make up the loss and cover benefits promised to employees. The system serves about 1.7 million members.

“When things got rough, we didn’t panic,” Dear said. “We stuck with our exposure to growth assets and applied the lessons we learned from the past. The numbers show us that our approach is working.”

The fund’s private-equity investments gained 13.6 percent for the nine months through March 31, while the value of its holdings in real estate rose 11.2 percent, Dear said. Results for both asset classes trail the rest by three months. Calpers lost 1.6 percent on its fixed income holdings, Dear said.

The Federal Reserve’s third round of stimulus, coupled with economic data showing improvements and housing gains, drove the Standard Poor’s 500 Index up 18 percent in the same 12-month period. Profits at companies in the benchmark equity gauge rose for the fourth straight year in 2012 to a record.

Calpers’ investment results have been volatile in the past five years. It lost a record 23 percent in 2009 and gained almost 21 percent in 2011. Last year, it earned 1 percent.

The fund needs to earn at least 7.5 percent to match its assumed rate of return. The rate is used to calculate how much money the plan will need to cover promised benefits, and what employers must contribute.

Fully funded when the recession began in December 2007, Calpers had about 74 percent of the money needed to meet long- term commitments as of June 2011, according to its most-recent estimate. A tentative assessment of the funding level put it at about 70 percent a year later.