China’s internet search giant Baidu on July 28 reported the largest quarterly profit decline in nearly eight years as expenses increased and profit margin narrowed in the second quarter.

Baidu said in a statement that its net profit in the second quarter ended on June 30 fell 34.1% to 2.41 billion yuan from 3.66 billion yuan a year earlier, as expenses rose 17% to 15.4 billion yuan and gross profit margin narrowed to 52.2% from 60.8% a year earlier.

Although its revenue in the quarter rose 10.2% to 18.26 billion yuan from 16.58 billion yuan a year earlier, this marked its slowest growth in nearly eight years.

In the statement, the company also gave a downbeat revenue projection for the current quarter. It now expects third-quarter revenue to reach the 18.04 billion yuan-18.58-billion-yuan range, implying a 1.9%-1.1% year-over-year decrease.

Last month, Baidu cut its revenue projection for the second quarter, citing lower medical advertising revenue as Chinese regulators heighten scrutiny of the fast-growing medical sector.

While advertising accounts for the bulk of its revenue, Baidu has been trying to expand beyond search, a bold and costly move that is also weighing on its results.