Tesla Motors CEO Elon Musk has threatened to fire key executives from his China team after weak sales of the automaker’s luxury electric cars. And last week, the company’s chief marketing officer in China resigned. Although the media widely covered the management shakeup, the press has largely ignored the context: a massive boom in China’s market for electric cars. For after years of lackluster growth, electric vehicle sales in the world’s second largest economy are surging – and they are leaving Tesla TSLA behind. This represents a striking change of pace for China’s electric vehicle industry, and is likely a key reason that Musk is flustered.

Growth in China’s electric vehicle industry has been a long time coming. Starting in the early 2000s, China made a lofty goal to leapfrog the West in automotive technology by becoming a world leader in electric cars. The government declared it would have around 500,000 electric vehicles on the road by 2011. That didn’t happen. In fact, China sold fewer than 6,000 that year. Even as electric vehicle sales have swelled in America and Japan, China’s attempt to surpass the U.S. in automotive technology has sputtered.

Until recently, China’s lagging electric vehicle industry stood in sharp contrast to its overall auto industry. From 2000 through 2014, China’s auto market expanded at an astonishing rate. In 2000, the country produced fewer passenger cars than Spain – about 2 million, according to statistics from the International Organization of Motor Vehicle Manufacturers. However, China’s Association of Automobile Manufacturers reported last month that 2014 automotive sales surpassed 23 million – making China by far the largest auto market in the world. In 2011, the World Bank estimated per capita vehicle ownership in China at only 69 per thousand people, compared to about 800 per thousand people in the U.S. So China’s industry has significant room for growth.

The rise of China’s auto industry has been fueled by foreign investment, oil and technology – and it has brought with it a suffocating smog epidemic in China’s largest cities that is driving away wealthy Chinese and foreign expats. China’s Minister of Science and Technology Wan Gang has long been working on a plan to replace foreign energy, innovation and capital with domestic resources. He is a former Audi engineer and over more than a decade, his goal has been to overtake the West in automotive technology by pushing China past the era of internal combustion engines and toward electric vehicles – thus setting the stage for China to dominate the $2 trillion-plus global auto market. Wan Gang also sees electric vehicles as one partial solution to China’s sooty air.

My book, The Great Race: The Global Quest for the Car of the Future, tells how up until recently that project has been a series of ambitious failures. As late as January 2014, China was selling only about 600 electric cars per month – that same month the U.S. sold over 6,000.

But during the last four months of 2014, China’s electric vehicle sales skyrocketed. In December alone, monthly sales of passenger and commercial electric vehicles hit 27,000. According to data from the China Automotive Technology Research Center and the Department of Energy’s Argonne National Laboratory, sales of electric cars in China surpassed sales of electric cars in the U.S. for the first time. In fact, China’s electric vehicle sales in December 2014 were almost 30 times higher than January 2014 sales.

Many analysts say that the last four months of 2014 will be remembered as the stretch when China’s electric vehicle market finally turned a corner. If this growth continues, China may surpass the U.S. as the world’s largest market for electric vehicles in 2015.

All this raises a number of questions: First, are these sales figures reliable? Statistics on China’s automotive market are often vague and unreliable. But statistics from the China Automotive Technology Research Center – a massive technical body responsible for everything from crash testing to vehicle battery standards — tend to be good. Some would say they are the gold standard in Chinese automotive data. The website EV-sales.blogspot.com essentially confirmed the 2014 numbers – supported by sales numbers for individual models. EV-salesblogspot.com reported that Tesla was outsold by five domestic manufacturers in China: BYD, Kandi, Chery Zotye and BAIC.

That leads to a second question: why are sales booming? An analyst from the China Automotive Technology Research Center attributed the jump to the elimination of the vehicle tax on Chinese electric vehicles (until September 2014, buyers were taxed at 10% of the purchase price). But is it really possible that lifting a 10% tax could cause such a massive surge in sales? Perhaps. Policy-led price adjustments have sometimes had spectacular results in China’s auto market. For instance, when the country joined the World Trade Organization in 2001, it lowered import tariffs on foreign automobiles. That year, China’s auto market grew by 37%, as some domestic producers were forced to lower prices to remain competitive. When Chinese automaker First Automotive Works Tianjin reduced its sticker price for one model by 20%, sales shot up 900%, according to one study on the Chinese auto market.

More recently, when China’s auto market started to slow in February 2008 – together with the rest of the world – the country sought to stimulate automotive sales and encourage its citizens to buy cleaner cars by cutting taxes on small displacement gasoline engines. In March, 2008 the central government cut taxes on these small cars to 5% from 10%. Auto sales jumped by 22% in April, and grew by 49% annually in 2009. That was the year China became the largest auto market in the world.

It’s still far from clear what factors are driving China’s recent electric vehicle boom – and why Tesla was left out. It’s possible that year-end government procurement led to unusually strong numbers in December. Another possibility is that China’s policies to promote electric vehicles have finally reached a tipping point. For instance, to deal with traffic congestion in major Chinese cities, many municipal governments – including Beijing – have limited the number of new vehicle registrations. In Beijing, electric vehicles are exempt from this quota system. The central government has also instituted a new set of policies to encourage competition among domestic manufacturers — competitive pressure that was woefully lacking during the early years of China’s electric vehicle program. Perhaps locally produced vehicles have finally reached a quality threshold that make them attractive to Chinese buyers.

Whatever the reason, just as China’s electric vehicle market is taking off, Tesla is facing new competitive challenges at home and abroad. Traditional automakers like BMW, Volkswagen VOW3 and General Motors GM are developing electric vehicles that are faster, cheaper, and boast better range than before. In fact, in October 2014, Volkswagen’s CEO Jochem Heizmann announced the company was developing more than 20 electric vehicles for the Chinese market. Then there is also the prospect of competition from newcomers like tech giant Apple AAPL – which is hiring away Tesla’s engineers for princely sums and is rumored to be developing its own electric car. At the same time, Tesla is struggling to establish its brand in the world’s key emerging market at what may be a critical inflection point. That is a huge problem.

Perhaps that explains why Musk is losing his cool over weak China sales. Up until recently, China has been an underperforming electric vehicle market, and Tesla has been an over-achieving electric vehicle company. Suddenly, that equation has flipped.

Levi Tillemann is the Jeff and Cal Leonard Fellow at the New America Foundation and author of The Great Race: The Global Quest for the Car of the Future, which chronicles the rise of electric cars and China’s messy attempt to leapfrog the West in automotive technology. Previously, he served a two-year presidential appointment advising the U.S. Department of Energy on domestic and international policy.