An investor looks at screens showing stock market movements at a brokerage house in Shanghai.

As the mainland Chinese stock market dropped in the second quarter, groups with government ties bought shares, according to a Goldman Sachs analysis.

The "national team" of entities related to or influenced by the state was formed in 2015 to help support stocks during that summer's market turmoil. The Shanghai composite crashed more than 40 percent that year, and has struggled to recover since. The index's losses accelerated in June, when it fell 20 percent from a recent high, or into a bear market. Beijing's efforts to reduce the economy's reliance on debt has led to tighter financial conditions, while rising U.S.-China trade tensions have added to pressure on growth. In all, the Shanghai composite lost 10 percent in the second quarter.

During that time, the national team bought an estimated net 116 billion yuan — or nearly $17 billion — worth of local stocks known as A shares, Goldman Sachs' Chief China Equity Strategist Kinger Lau said in a Friday report.

The "national team" looks active again as the market weakens

Source: Goldman Sachs Global Investment Research

The second-quarter purchases account for about 0.2 percent of market capitalization and follow sales of 71 billion yuan in the first quarter, Lau said. Overall, his team estimated the national team holds 1.5 trillion yuan worth of A shares, or about 2.9 percent of the listed market capitalization.

The findings are based on analysis of required quarterly disclosures of the top 10 shareholders in A share companies.

China Construction Bank had the largest portion of shares held by the national team, at 28 percent, according to the Goldman report. Some medical companies, such as Shinva Medical Instrument and North China Pharma, also appeared on a list of the 10 stocks with the largest percent of shares owned by the national team, according to the Goldman analysis.

Top ten stocks by percent of "national team" holdings

Source: Goldman Sachs Global Investment Research. Note: Excludes strategic holdings before 2Q15.

Overall, the national team is heavily overweight banks, energy and insurance companies, and has relatively fewer holdings in consumer staples and technology industries, "reflecting its overarching allocation bias towards 'Old China," the Goldman report said. Stocks with purchases by the national team have generally fallen less than the overall market, the analysis showed.

Beijing is in the middle of a years-long attempt to transition its economy from relying on manufacturing industries to consumption.

The national team includes Central Huijin Investment, China Securities Finance, State Administration of Foreign Exchange investment platforms, five mutual funds, insurance firms and state-owned enterprises' equity holdings, according to the Goldman report.

Phone numbers for the China Securities Regulatory Commission and State Administration of Foreign Exchange listed on their websites immediately disconnected when reached by CNBC midday Tuesday. There was no listed fax number, the regular means for reaching Chinese government agencies. The State Administration of Foreign Exchange also did not immediately respond to an emailed request for comment.

The Shanghai composite traded mildly lower at about 2,667 on Tuesday, near the lows of the summer and at a level last seen in 2014.