China’s ceremonial legislature has endorsed a law meant to help end a costly tariff war with Washington by discouraging officials from pressuring foreign companies to hand over technology.

The technology measure is part of a law on investment approved Friday that China’s government says is intended to improve conditions for foreign investors.

The approval comes in the midst of a rapid-fire series of U.S.-Chinese negotiations aimed at ending a fight over American complaints Beijing’s technology policies violate its market-opening obligations.

The government said earlier the law would prohibit officials from using “administrative measures” to compel companies to hand over technology. The version approved by the National People’s Congress wasn’t immediately released.

Business groups welcomed the proposed law but said they need to see how it will be enforced.

Featured Video