A court in China has granted Qualcomm an injunction against Apple.

The court has banned the import and sale of nearly all iPhone models in China, according to a statement Monday from Qualcomm. Apple is already disputing the scope of the ban, saying it only applies to iPhones that run on an older operating system.

Apple shares lost 2 percent on Monday morning but later turned positive, while shares of Qualcomm rose 3 percent. Apple's stock turned negative for 2018 on Friday and is already down 26 percent this quarter.

"Qualcomm's effort to ban our products is another desperate move by a company whose illegal practices are under investigation by regulators around the world," Apple said in a statement. "All iPhone models remain available for our customers in China. Qualcomm is asserting three patents they had never raised before, including one which has already been invalidated. We will pursue all our legal options through the courts."

The patents in question only affect iOS 11, the operating system for iPhones and iPads that launched in 2017, Apple says. iPhones sold today run iOS 12, the new version of the software that launched in September.

The Fuzhou Intermediate People's Court in China granted the two preliminary injunctions against four Apple subsidiaries in China. It relates to two Qualcomm patents that enable users to adjust and reformat the size and appearance of photos and to manage applications using a touch screen when viewing and navigating apps on their phones. iPhones are currently sold with the operating system iOS 12, which Apple says does not violate the patents in question.

In a statement, Qualcomm said, "We deeply value our relationships with customers, rarely resorting to the courts for assistance, but we also have an abiding belief in the need to protect intellectual property rights."

The statement, from General Counsel Donald Rosenberg, added, "Apple continues to benefit from our intellectual property while refusing to compensate us. These Court orders are further confirmation of the strength of Qualcomm's vast patent portfolio."