By JOE McDONALD
AP Business Writer

BEIJING (AP) _ General Motors Co.’s $5 billion initiative to create cars for China and other emerging markets comes just as automakers face a collapse in the booming Chinese demand they were counting on to power their growth.

June sales in the biggest car market by number of vehicles sold shrank by 3.4 percent from a year earlier as an economic slowdown deepened and smog-choked cities tried to curb growth in car ownership. Sales growth has cooled from 2009’s explosive peak of 45 percent, but the latest figures surprised analysts, who were forecasting a healthy 7 to 8 percent for this year.

On Wednesday, Volkswagen AG said its second-quarter profit fell 16 percent due partly to weakness in China, where first-half sales fell 0.5 percent.

Those still buying cars are benefiting: GM and VW, China’s top-selling brands, have cut prices by up to 53,900 yuan ($8,700). Analysts say dealers are struggling financially and automakers also might have to share more profit with them.

“The days when you could sell whatever car you made are not there anymore,” said industry analyst Lin Huaibin of IHS Automotive.

This wrenching shift is especially significant because of China’s outsize role in the global ambitions of U.S., European and Asian automakers.

Despite the slowdown, they are pushing ahead with multibillion-dollar plans to expand production and create models to suit Chinese tastes, adding to competition in a crowded market.

On Tuesday, GM said it will work with its main Chinese partner, Shanghai Automotive Industries Corp., to develop vehicles to be sold in China, Brazil, India and Mexico. GM said it aims for annual sales of 2 million vehicles beginning in 2019.

In April, Ford Motor Co. and a local partner announced they would spend $1.1 billion on a factory in China’s northeast. Ford said that would add 200,000 vehicles to its annual China production capacity.

China passed the United States in 2009 as the biggest market by number of vehicles sold as incomes rose and Beijing promoted the industry as an engine of economic development.

Double-digit Chinese sales growth helped to buoy global automakers after the 2008 financial crisis crushed demand everywhere else.

Automakers added bigger backseats and other features for Chinese buyers, changing the look and feel of cars sold worldwide. Nissan Motor Co. made China a pillar of its global turnaround strategy.

Companies were preparing for slower growth, but the squeeze hit faster than many expected.

“The impact to earnings in 2015 could be substantial,” said Bernstein Research in a report. “We still expect China to sell a lot more cars in future years, but returns in the market may never be the same again.”

Sales in the first half rose 4.8 percent over a year ago, down from 11.2 percent growth in the same period of 2014, according to the China Association of Automobile Manufacturers.

Even that might overstate demand. Analysts say automakers have shifted to reporting shipments to dealers instead of retail sales, possibly to obscure how few cars are being purchased.

Last week, South Korea’s Hyundai Motor Co. said China sales fell 14 percent from a year earlier in the three months ending in June. That contributed to a 24 percent decline in profit.

As early as March, BMW AG warned the China outlook was darkening. Europe’s biggest luxury automaker said its Rolls Royce unit had sold only 14 cars to Chinese buyers in February.

The downturn is so severe that Barclays slashed its forecast for this year’s sales growth to just 1.7 percent from 8.5 percent. Next year’s forecast was cut to 5.2 percent from 8.5 percent.

Chinese sales still are huge. GM said a record 1.7 million GM-brand vehicles were sold in the first half of the year. But growth was just 4.4 percent from a year earlier _ less than half the 10.7 percent rise for the first half of 2014.

Economic growth slowed as 7 percent in the first quarter _ less than half of 2007’s peak of 14.2 percent _ as the Communist Party tries to steer China to more sustainable growth driven by domestic consumption instead of trade and investment.

“It is not that customers don’t want to buy cars. They do want to buy. But they are smothered,” said Zhang Xin, an analyst for Guotai Jun’an Securities in Beijing.

Automakers also are paying for a sales spike in 2013-14 as buyers rushed to get cars before Beijing and other cities tightened controls on new vehicle registration.

“This year, you will see some `payback effect’,” said Lin of IHS Automotive.

Foreign brands also face pressure from lower-priced Chinese rivals including Geely, Chery and SUV brand Great Wall, which are improving quality.

Earlier, Volkswagen blamed anemic first-quarter sales growth of just 2 percent on its lack of a low-priced SUV, a segment dominated by Chinese brands in which demand surged.

In May, GM’s joint venture with SAIC cut prices of 40 models by up to 53,900 yuan ($8,700). In June, VW announced cuts of up to 12,000 yuan ($2,000). Great Wall Motors cut prices by up to 6,000 yuan ($970) to rev up weak SUV sales.

Dealers had an unusually large backlog of 140,000 unsold vehicles by the end of May, according to LMC Automotive. It said manufacturers might cut production until those sell.

“We have little reason for optimism,” said LMC analysts in a report. “We believe that the painful market adjustment currently under way is far from over.”