Toyota (TM) may have experienced its first decline in two years across several of its divisions, but the company still managed to sell more vehicles than its next largest rival in the first six months of the year.

The Japanese automaker sold 4.91 million cars and trucks globally from January through June, a decline of 1.2% a year ago, according to data released Friday. However, it topped its next closest rival, General Motors (GM), which sold 4.85 million during the same period.

That’s not to say GM isn’t catching up. The car manufacturer earlier this month said it sold 4% more cars than it did a year ago as it continued to grab a larger share of the U.S. market amid rebounding truck demand.

U.S. car makers are luring more domestic demand away from their Japanese adversaries this year, evidenced by strong sales demand that has helped boost GM and its domestic peers Chrysler and Ford (F). Japan, meanwhile, has also struggled against growing backlash from consumers in China following a dispute over land.

GM has been trying to regain its title from Toyota as the world’s top-selling car company after losing the top spot in 2008 after a seven-year reign. While it temporarily nabbed the throne in 2011 when Toyota suffered from the nation's devastating tsunami, Toyota has since recaptured it.

Shares of Toyota were down 4% in morning trade, mirroring a sell-off in the broader markets. Shares of GM slumped about 1.5%.  

Follow Jennifer Booton on Twitter at @Jbooton