Xiaomi had a bumpy start to its market debut in Hong Kong on Monday.

In early trading, shares in the Chinese smartphone maker sank as much as 5.9% from their listing price, which was already at the bottom of the range the company had sought. They later recovered most of their losses, but still closed down 1.2% despite gains in the broader market.

Xiaomi's IPO raised $4.7 billion at a valuation of about $54 billion -- the world's biggest tech or telecom listing since Alibaba (BABA) raised more than $20 billion in 2014, according to data provider Dealogic. But Xiaomi's offering ended up far smaller than the $10 billion target that had been reported earlier in the year.

The company's weak debut comes at a time when global markets have been roiled by the escalating trade clash between the United States and China. The dispute has its roots in American concerns about China's tech ambitions and its huge trade surplus with the United States.

Stocks in Hong Kong and Shanghai have taken heavy hits. Before Monday, Hong Kong's benchmark index had fallen more than 10% from early June.

Xiaomi CEO and co-founder Lei Jun acknowledged the unfortunate timing in remarks at the Hong Kong stock exchange on Monday morning.

"At this critical moment in Sino-US trade relations, the global capital markets are in constant flux," he said.

"Although the macroeconomic conditions are far from ideal, we believe a great company can still rise to the challenge and distinguish itself," Lei added.

Related: Xiaomi is going after Europe

Analysts say a combination of concerns have weighed on Xiaomi's IPO.

"The tit-for-tat going on in the political front between the Unites States and China is spilling over, especially in the tech space," said Jake Saunders, an analyst at ABI Research. "The way ZTE got very severely pummeled in the United States ... that's certainly also had impact," he added.

Chinese smartphone and telecommunications equipment maker ZTE has been in crisis since the US government banned American companies from selling it components, citing violations of an earlier deal that punished the company for evading sanctions on Iran and North Korea.

Related: How China's Xiaomi took India's smartphone market by storm

Xiaomi has also faced questions from analysts over its ability to increase profit margins in the future, given that much of its smartphone sales are at the lower end of the market.

"The market is really concerned about how much growth Xiaomi can generate in 2019, and whether the company can deliver" on what it pitched to investors, said Hao Hong, chief strategist at Hong Kong-based broker BOCOM International.

Xiaomi argued that it should receive a higher valuation than other hardware makers because of the internet services -- such as music and video streaming apps -- it offers with its devices.

Enthusiasm for Xiaomi may have waned because investors are holding out for other big Chinese tech IPOs on the horizon, Hong said.

Tencent (TCEHY) said over the weekend that it plans to list its music streaming business in the United States, and online services platform Meituan Dianping filed last month to go public in Hong Kong. Meanwhile, ride-hailing company Didi Chuxing and Alibaba-affiliated digital payments firm Ant Financial are also reportedly considering IPOs.

Related: Xiaomi's shrinking IPO shows tougher climate for China tech

Founded in 2010, Xiaomi was the fifth biggest smartphone maker in the world last year, according to research firm IDC.

Its main business is phones, but it also sells a range of other internet-connected devices, including scooters and even smart rice cookers. Most of its sales are in China, but it's growing aggressively in other countries.

Xiaomi overtook Samsung to become the number one smartphone seller in India earlier this year. The company is also making waves in Europe, where after less than two years in the market, it has become the fourth biggest smartphone seller. Latin America is also on the horizon.

-- Pia Deshpande contributed to this report.