WASHINGTON — President Trump handed the Chinese telecommunications firm ZTE a lifeline on Thursday, agreeing to lift tough American sanctions over the objections of Republican lawmakers, his defense advisers and some of his own economic officials.

The deal will help defuse tensions with the Chinese president, Xi Jinping, who personally asked Mr. Trump to intervene to save ZTE and whom the president has relied on to help pave the way for next week’s summit meeting with the North Korean leader.

The Commerce Department said that ZTE had agreed to pay a $1 billion fine, replace its board and senior leadership, and allow the United States to more closely inspect the company by effectively having a handpicked compliance team embedded inside the firm. The United States would then lift a seven-year ban that prevented the company from buying American products and was quickly driving it out of business.

[Read more about ZTE.]

But the settlement has inflamed lawmakers, including top Republicans, who objected to helping a Chinese company that broke American law and has been accused of posing a national security threat. It also puts the United States in an awkward position as it punishes allies like Canada, Mexico and the European Union with stiff tariffs on steel and aluminum, and insists that countries in Europe and elsewhere abide by American sanctions on Iran.