Both the companies saw higher sales.
GM was the top-selling carmaker for more than seven decades before losing the title to Toyota in 2008. But GM retook the sales crown in 2011 when Toyota's factories were slowed by an earthquake and tsunami in Japan.
The disaster left Toyota dealers with few cars to sell. The company has since recovered.
Toyota's comeback is only part of the story, said Jeff Schuster, senior vice president of forecasting for LMC Automotive, an industry forecasting firm. The company also has rolled out new vehicles, such as the revamped midsize Camry, the most popular vehicle in the United States.
GM's global sales were up 2.9 per cent last year. Toyota sales rose 22 per cent.
Mr Schuster expects Toyota to keep the lead over GM this year as it launches a new Corolla.
"I think that's going to be enough to keep them in their position," he said.
GM is also contending with a stronger Volkswagen. It narrowly edged out the fast-growing German company for second place in 2012, when VW sold a record 9.1 million vehicles.
Volkswagen, with fast-selling vehicles like the Passat midsize sedan and Jetta compact, closed in on GM with an 11 per cent sales increase across the globe. The United States, where VW Group sales rose 34 per cent, led the way.
Mr Schuster expects GM to hold off Volkswagen in 2013 because VW has more of a presence in Europe, where sales are falling as the region heads struggles with high unemployment and weak economies.
GM has said in the past that it's more concerned with profitable growth than the global sales race.