WASHINGTON — Three years ago, President Barack Obama struck a deal with China that few thought was possible: President Xi Jinping agreed to end his nation’s yearslong practice of breaking into the computer systems of American companies, military contractors and government agencies to obtain designs, technology and corporate secrets, usually on behalf of China’s state-owned firms.

The pact was celebrated by the Obama administration as one of the first arms-control agreements for cyberspace — and for 18 months or so, the number of Chinese attacks plummeted. But the victory was fleeting.

Soon after President Trump took office, China’s cyberespionage picked up again and, according to intelligence officials and analysts, accelerated in the last year as trade conflicts and other tensions began to poison relations between the world’s two largest economies.

The nature of China’s espionage has also changed. The hackers of the People’s Liberation Army — whose famed Unit 61398 tore through American companies until its operations from a base in Shanghai were exposed in 2013 — were forced to stand down, some of them indicted by the United States. But now, the officials and analysts say, they have begun to be replaced by stealthier operatives in the country’s intelligence agencies.