A court has forced Chinese smartphone maker Xiaomi to stop selling its phones in India, denting the company's aggressive expansion plans, after Ericsson claimed the upstart company infringed its patents. Xiaomi – commonly viewed as China's answer to Apple - sells its phones through one of India's biggest ecommerce sites, Flipkart. Both have been ordered by the Delhi High Court to stop making, importing or selling devices until February, according to court documents seen by Reuters. Read MoreDoes Xiaomi threaten Apple's ambition in China?

Ericsson has accused Xiaomi of infringing eight patents related to its wireless technology and said it has been trying to resolve the issue with the Chinese company for three years. The reported high court injunction covers the devices containing the disputed technologies.

"It is unfair for Xiaomi to benefit from our substantial R&D investment without paying a reasonable licensee fee for our technology," an Ericsson spokesperson told CNBC in a statement via email. Xiaomi said that it hadn't received the court ruling but was looking into it. "Regarding the court injunction, we haven't received an official notice from the Delhi High Court. However, our legal team is currently evaluating the situation based on the information we have," Manu Jain, Xiaomi's head of India operations, said in a statement. Read More3 reasons why Apple should watch out for Xiaomi

"India is a very important market for Xiaomi and we will respond promptly as needed and in full compliance with Indian laws." A spokesperson for Flipkart said the company would "abide by the laws of the land and cooperate with authorities wherever required."

Expansion derailed? Xiaomi has had a meteoric rise, knocking Samsung off the top spot in China as the biggest smartphone vendor and rising to third in global market share, according to tech research firm IDC. Xiaomi has built its success on low-cost smartphones with high specifications, appealing to consumers in emerging markets such as China and India.

Xiaomi headquarters in Beijing, China Edmond Lococo | Bloomberg | Getty Images