Hong Kong (CNN Business) China's economic slowdown is taking its toll on one of the country's biggest tech companies.

Baidu BIDU loss of 327 million yuan ($47 million) for the three months to March due to a slump in its main online advertising business. Search enginereported a netloss of 327 million yuan ($47 million) for the three months to March due to a slump in its main online advertising business.

That was the company's first loss since it went public in 2005, and compared with a profit of 6.7 billion yuan during the same period last year.

in premarket trading, wiping nearly $5.8 billion off its market value. Baidu's stock price plunged more than 10% in premarket trading, wiping nearly $5.8 billion off its market value.

CEO Robin Li said the sharp drop in earnings was due in part to China's broader economic slowdown and increased government scrutiny of online content, which had hurt the company's core business. Online marketing accounted for 73% of Baidu's quarterly revenue of $3.6 billion.