Stanford University’s endowment invested in three oil and gas companies in the third quarter, a few months after saying it would end direct investing in publicly traded coal-mining ventures, Bloomberg reported Nov. 17.

The endowment, valued at $21.4 billion as of August, bought shares of Rex Energy Corp. (NASDAQ: REXX) with a market value of $15.5 million at the end of the quarter, according to a regulatory filing Nov. 16. Stanford also bought shares in YPF SA (NYSE: YPF) and Petrobras Argentina SA (NYSE: PZE), with a market value of $11.1 million as of Sept. 30. The fund exited its stake in ExxonMobil Corp. (NYSE: XOM), which had a value of about $201,000.

“This doesn’t run counter to Stanford’s commitment because they made it clear they would divest from coal, but it certainly isn’t in the spirit of the commitment they made,” said Jamie Henn, communications director for 350.org, a group seeking to get campuses across the country to divest from fossil fuels. “It’s disappointing to see a university that has been so forward-looking on these issues continue to walk backwards when it comes to their endowment.”

The university press office didn’t respond to an e-mail seeking comment.

Stanford’s Board of Trustees said in May that the university wouldn’t directly invest in public coal companies, and would recommend the same to outside managers who invest on the school’s behalf. Stanford is the wealthiest university to agree to divest from some fossil fuel companies. Of the 13 other colleges and universities that have committed to divest, 12 have included oil and gas, according to 350.org.

Marcellus Shale

Rex Energy, an oil and natural gas company based in State College, Pa., has been involved in fracking of the Marcellus Shale natural gas formation in the northeastern U.S.

The Trustees’ May statement also indicated that they hoped other fuel sources would emerge in the future so that Stanford could divest from oil and gas companies as well.

The endowment’s public equity positions were valued at $196.8 million at the end of the third quarter, as most of its money is handled by external managers.

Stanford’s primary investment pool, which includes most of the university’s endowment, reported a 17% return on its investments in the year through June 30.