United States and China agreed on Friday to the first phase of a deal to end a trade war, prompting President Donald Trump to suspend a threatened tariff hike, but officials said the agreement had to be put on paper and more work was required to get it finalized.