WASHINGTON — Middle East experts at major U.S. think tanks were hacked by Chinese cyberspies in recent weeks as events in Iraq began to escalate, according to a cybersecurity firm that works with the institutions.

The group behind the breaches, called “Deep Panda” by security researchers, appears to be affiliated with the Chinese government, said Dmitri Alperovitch, chief technology officer of the firm CrowdStrike. The company, which works with a number of think tanks on a pro bono basis, declined to name which ones have been breached.

Alperovitch said the firm noticed a “radical” shift in Deep Pandas’ focus on June 18, the same day witnesses reported that Sunni extremists had seized Iraq’s largest oil refinery. The Chinese group has typically focused on senior individuals at think tanks who follow Asia, said Alperovitch. But last month, it suddenly began targeting people with ties to Iraq and Middle East issues.

This latest breach follows a pattern identified by experts of Chinese cyberspies targeting major Washington institutions. It’s rarely clear why Chinese cyberspies hack specific American targets, but experts say there are a few clues to why Deep Panda may have been interested in Middle East experts at think tanks.

China’s need for natural resources has skyrocketed, and the country has increasingly turned to the Middle East to fuel its energy needs. China surpassed the United States as the world’s largest net importer of petroleum and other liquid fuels last September, according to the U.S. Energy Information Administration. In Iraq, China is a major oil investor.