Despite all of the mistakes General Motors (GM 1.20%) made that led to its bankruptcy during the Great Recession, the company was very far-sighted in one respect. GM invested heavily in China, and grabbed a big chunk of what is now the world's largest auto market. Today, Ford Motor (F 0.69%) and other competitors are racing to catch up. However, one rival is already in position to overtake GM: Volkswagen.

Volkswagen's upscale Audi brand has become the leader in China's luxury market, and the company's entry-level and midrange offerings have also proven popular there. GM needs to be careful not to rest on its laurels, because Volkswagen is just the first of many global automakers that want a piece of GM's China market share.

Catching up

Last year, Volkswagen was nipping at GM's heels in China. By the latter part of the year, Volkswagen was frequently outselling GM on a monthly basis, but the full-year sales crown still went to GM.

In total, GM delivered 2.84 million vehicles in China in 2012, representing 11% growth. However, Volkswagen reported a spectacular 24.5% growth rate for the same period, and ended with 2.81 million deliveries in China for the year .

Volkswagen has not been able to maintain the same growth pace in 2013, but it is still gaining ground relative to GM. Through October, GM had increased its deliveries in China by 11.2%, to just shy of 2.6 million vehicles . By contrast, Volkswagen has posted 17.2% growth year to date, with 2.65 million vehicle deliveries in China .

Given that Volkswagen has been regularly outpacing GM in terms of deliveries in recent months, VW seems destined to win the market share battle this year.

Battle for the luxury market

Volkswagen's biggest strength in China is the leading position of its Audi brand within the luxury market. It held a 31% share in the first half of 2013 . Through September, Audi deliveries in China totaled 358,200 : up more than 20% year over year.

Audi has cornered a big portion of the Chinese luxury auto market

GM is looking to strike back by boosting the profile of the Cadillac brand in China. A key turning point was the beginning of local production for the Cadillac XTS, which occurred earlier this year . Through the end of September, Cadillac sales grew more than 50% year to date in China. Still, that only added up to 32,238 units, leaving Cadillac with less than a tenth of Audi's market share.

GM and its joint venture partner SAIC are expanding Cadillac production capacity over the next few years, and GM hopes to grow China Cadillac sales to 100,000 by 2015 and 250,000 by the end of the decade. Still, based on Audi's recent growth profile, it could be way ahead at the end of the decade, even if Cadillac hits its internal growth targets.

An opening?

One of the good things about the Chinese auto market is that there is plenty of room for everybody to grow over the next five to 10 years. That said, the automakers that secure the biggest market share could have a long-term advantage due to the brand loyalty that often characterizes the auto market.

Volkswagen was recently forced to recall 2.6 million vehicles globally, of which about a third are in China. The recall includes models from all of Volkswagen's major brands . If Chinese consumers become worried about Volkswagen's reliability, GM may have a valuable opportunity to retake share. Investors should definitely keep an eye on how the market share battle between the two plays out over the next year.

Foolish bottom line

While General Motors has been the market share leader in China for many years, it is about to lose its sales crown to Volkswagen this year. Volkswagen's triumph is even more significant because it also dominates the ultra-profitable luxury market through the Audi brand.

GM needs to make its move soon if it wants to continue challenging Volkswagen for the top spot in the Chinese market. Other global automakers that are currently weaker in China -- like Ford -- are making plans for a big push in the next decade or so, so retaking market share will only get harder as time goes on.

The market share rankings at the end of this decade could significantly help to determine the long-term structure of China's auto market. GM should double down on China to ensure that it doesn't waste its first-mover advantage.