Former U.S. President Barack Obama (R) shakes hands with Chinese President Xi Jinping during a state arrival ceremony on the south lawn of the White House grounds September 25, 2015 in Washington, DC.

China has been violating an agreement with the United States aimed at stopping cyber espionage through the hacking of government and corporate data, a senior U.S. intelligence official said on Thursday.

When asked if China was violating the 2015 agreement between then President Barack Obama and Chinese President Xi Jinping, National Security Agency official Rob Joyce said: "We think they are."

But he added that the quantity and number of attacks had dropped "dramatically" since the agreement.

"While it's not black and white, (China) met the agreement or they didn't meet the agreement, it's clear that they are well beyond the bounds today of the agreement that was forged between our countries," Joyce said.

In September 2015, Obama announced he had reached a "common understanding" with Xi on curbing economic cyber espionage, but threatened to impose U.S. sanctions on Chinese hackers who persist in committing cyber crimes.

The two leaders said they agreed that neither government would knowingly support cyber theft of corporate secrets or business information.

The agreement, however, stopped short of any promise to refrain from traditional government-to-government cyber spying for intelligence purposes.

That could include the massive hack of the U.S. federal government's personnel office this year that compromised the data of more than 20 million people. U.S. officials have traced that back to China, but have not said whether they believe the Chinese government was responsible.

The United States and China will hold a delayed top-level security dialogue on Friday, the latest sign of a thaw in the countries' strained relations amid an ongoing trade row ahead of a planned meeting between U.S. President Donald Trump and Chinese President Xi at the Group of 20 summit meeting in Argentina at the end of November.