Bill Gross's Pimco Total Return Fund, the world's largest bond fund, rose about 1.1 percent in August to beat 76 percent of its peers, preliminary Morningstar data showed on Friday.

The fund, which has $223 billion in assets and is the flagship fund of Pacific Investment Management Co, has notched that gain for the month through August 28. The performance was roughly equal to that of the benchmark Barclays U.S. Aggregate Bond Index over the period.

The Pimco Total Return Fund, which is closely watched in the industry, has had a rough year. Mohamed El-Erian, former Pimco chief executive and co-founder Gross's heir apparent, resigned earlier this year, and investors have pulled about $65 billion from the fund since May 2013, according to Morningstar data.

The $3.6 billion Pimco Total Return Exchange-Traded Fund, an actively managed ETF designed to mimic the strategy of the flagship mutual fund, also rose 1.1 percent over the same period, beating 81 percent of peers.

Analysts said the flagship mutual fund likely benefited from investing in longer-dated Treasuries compared with previous months. Treasuries with longer maturities gained more than shorter-term Treasuries in August.

"A lot of money has gone into Treasuries, pushing yields down and rewarding funds that have taken on some interest rate risk," said Todd Rosenbluth, director of mutual fund research at S&P Capital IQ. "That, I think, is playing an important role in helping the fund's performance stabilize versus some of its peers, many of whom have stayed short."

The Newport Beach, California-based Pimco, a unit of European financial services company Allianz SE, had $1.97 trillion in assets as of June 30, according to the firm's website.