The auto industry was worried about millennials, thinking the generation would never transition into a stable customer base. But now, after a late start, millennials are finally starting to buy cars.

Data is now showing that millennials, especially the older individuals in the age group, are heading to dealerships and buying cars in big numbers.

Millennials Head to Dealerships

Millennials, who now dominate the U.S. in population, last year purchased 4 million cars and trucks. That number is second only to the generation that directly preceded them, the Baby Boomers. Data was compiled by J.D. Power's Power Information Network, which defined millennials as ages 21 to 38 in 2015.

Because of the big year of buying for millenials, the generation now jumps up to 28 percent market share in the new car market. In California, the biggest market for cars in the country, millennials actually surpassed Baby Boomers for the first time.

Millennials Eventually Need a Car

Experts have been struggling to judge the attitudes and preferences of the millennial generation because it is so varied. Millennials include everyone from recent college graduates to suburbanites who have already settled down.

Automakers were also concerned that millennials were relying on alternative choices for transportation like ride-sharing services and short term rentals like ZipCar.

But just like the generations before them, millennials got jobs, started families and found themselves in need of a car.

"This whole idea that they're not going to need cars is absolutely ridiculous," said Steven Szakaly, the chief economist for the National Automobile Dealers Association. "The new car buyer age is just happening much later."

Poor Economy Meant Less Cars for Millennials

Back in 2010, the outlook for millennial car customers was very worrisome for the auto industry. Millennials make up about 30 percent of the U.S. population, and at the time they were buying just 17 percent of new cars. Auto executives were worried this low trend of buying would continue.

A 2011 University of Michigan study showed that fewer young people were getting their driver's licenses too. In 1983, data from a similar survey showed that 87 percent of 19-year-olds had their licenses, but in 2010 that number fell to only 69 percent. Millennials who chose not to attain licenses said they were either too busy to do so or preferred getting rides from friends.

But millennials also faced a bad economy and an especially high rate of unemployment in their age group in 2010. These factors may have been the real driving force, keeping millennials away from cars completely.

More Jobs, Low Interest Rates Sparked Buying

The economy has improved and unemployment has fallen for millennials to around 8 percent. With low interest rates for car loans and cheap gas prices, millennials are now able to purchase cars more easily than before.

Even though millennials are buying more cars like older generations, their attitudes about licenses and car ownership are different than those of older drivers.

Cars With More Tech

Automakers are realizing that millennials want to be connected while they are on the go, leading to improvements in in-car technology and support for phones and Internet services.

"Millennials are going to be the main generation we will cater to as an industry," said John Humphrey, J.D. Power's senior vice president of global automotive operations, according to AP.