BEIJING--An official gauge of China's factory activity rose to a three-month high in June, bolstered by improving demand.

The official manufacturing purchasing managers index edged up to 50.9 in June from 50.6 in May, the National Bureau of Statistics said Tuesday. The index has remained above the 50 mark for four straight months, which separates month-on-month expansion of activity from contraction.

Economists polled by The Wall Street Journal had expected the June reading to fall slightly to 50.5. Purchasing by manufacturers is a leading indicator of business activity because factories buy supplies in anticipation of demand.

The production subindex rose to 53.9 in June from 53.2 in May. The overall-new-orders subindex rose to 51.4, from 50.9 in May, a sign of improving manufacturing market demand.

Although the PMI index has rebounded this month and the manufacturing sector is steadily recovering, uncertainty remains the external challenge, said Zhao Qinghe, an analyst with the statistics bureau.

The new-export-orders subindex, a gauge of external demand, climbed to 42.6 in June from 35.3 in May. The subindex measuring imports increased to 47.0 from 45.3 in May.

"Small enterprises have greater difficulties in production and operation," Mr. Zhao said. The subindex for small enterprises dropped to 48.9 from 50.8 in May.

The nonmanufacturing PMI, a gauge of activity outside factory floors also released Tuesday, rose to a seven-month high of 54.4 in June from 53.6 in May, the statistics bureau said.

Write to Singapore editors at singaporeeditors@dowjones.com

(MORE TO FOLLOW) Dow Jones Newswires

06-29-20 2155ET