The Massachusetts state pension fund was among the winners Thursday as shares of AI giant Anthropic began trading on the Nasdaq at a value close to $2 trillion.

The Pension Reserves Investment Management Board, which oversees about $130 billion for state employees, teachers, and other government workers, confirmed it has invested in several funds of the Boston-based venture capital firm Spark Capital, which backed Anthropic over the past three years.

For Spark, this is a huge hit: Starting in 2023, the venture firm invested a total of about $777 million in Anthropic, for shares worth nearly $12 billion at the close Thursday, according to Globe calculations based on disclosures in Anthropic’s securities filings.

For Massachusetts pensioners, the precise gains have not been disclosed. The pension fund reportedly has invested $104 million across three Spark funds.

The pension board declined to comment on specific investments. Spark did not return a request for comment.

Get Power Play

A twice-weekly dive into the power players and moves driving business in Massachusetts, authored by long-time business columnists Shirley Leung and Jon Chesto.

Typically, Massachusetts pension funds would represent a small portion of each Spark fund, with many other pensions, endowments, and wealthy investors also participating.

The state pension fund, invested across stocks, bonds, venture capital, private equity, and other asset classes, gained 5.4 percent in the first 10 months of the year, according to the board’s October report.

After months of speculation, underwriters priced Anthropic’s deal at $83 per share for its initial public offering, raising a total of $81 billion. That valued Anthropic at about $1.4 trillion, and then its stock price jumped as soon as trading began Thursday morning. The price at the close of trading, $97.17 per share, pushed the company’s value to about $1.6 trillion.

Anthropic’s $81 billion haul is more than the $75 billion Elon Musk’s SpaceX raised in the initial pricing of its shares in June, though underwriters for the rockets and AI company sold another $10.7 billion over the following month. Anthropic trades under the symbol ANT on the Nasdaq.

Anthropic’s value has grown quickly since the company’s founding by chief executive Dario Amodei, his sister Daniela Amodei, and five others in 2021. The seven cofounders worked at rival OpenAI before quitting to launch their own firm, claiming they would emphasize safer development of AI technology.

Spark’s first investment of $75 million from 2023 is worth more than $6 billion, with later investments reaping less eye-popping profits.

Spark started in 2005 with an office on Newbury Street, led by Bijan Sabet, Todd Dagres, and Santo Politi, and backed companies such as Twitter, Wayfair, and Tumblr. Though it still has a Boston office, Spark’s larger offices currently are in New York and San Francisco. One of the firm’s San Francisco-based partners, Yasmin Razavi, connected with Anthropic to broker the firm’s investments in the AI company.

Aaron Pressman can be reached at aaron.pressman@globe.com. Follow him @ampressman.