BEIJING--A private gauge of China's factory activity showed an expansion for the third straight month in October due to renewed strength in exports, contrasting with the official gauge showing a contraction for the sixth consecutive month.

The Caixin China manufacturing purchasing managers index rose to a 32-month high of 51.7 last month from 51.4 in September, Caixin Media Co. and research firm Markit said Friday. The reading stayed above the 50 mark that separates expansion in activity from contraction.

The gauge for new export orders returned to expansion and reached the highest level since February 2018, Zhengsheng Zhong, an economist at CEBM Group said. That's possibly due to the U.S.' move to exempt more than 400 types of Chinese products from additional tariffs, Mr. Zhong said.

"If the improvement in demand, including that generated by infrastructure projects and exports, is able to continue, the manufacturing sector can gradually build a foundation for stability," he said in a statement accompanying the data release.

Business confidence about the 12-month outlook for output improved to its highest since April, with a number of firms saying they were optimistic that market conditions will strengthen, Caixin and Markit said.

Trade tensions between China and the U.S. thawed last month, as Beijing and Washington have been working to reach a partial trade deal. President Trump said Thursday that China and the U.S. are in the process of selecting a new site to sign phase one of a broader trade agreement between the two countries.

China's official manufacturing PMI, a competing gauge, dropped to an eight-month low 49.3 in October from 49.8 in September, the National Bureau of Statistics said Thursday.

The Caixin PMI more closely tracks small, private manufacturers, while the official index focuses more on large, state-owned firms. Many Chinese exporters are small and private firms. The official PMI has a larger sample base, surveying 3,000 manufacturers nationwide, while Caixin polls 500 companies.

--Liyan Qi