Mattel Inc, the world's largest toymaker, reported its first quarterly net loss in nearly five years due to a double-digit fall in sales of its iconic Barbie dolls, sending the company's shares down as much as 3 percent in early trading.

Mattel's worldwide sales fell 5 percent to $946.2 million in the quarter ended March 31 due to lower demand for its key toy brands.

Sales of Barbie dolls fell 14 percent, while those of Fisher-Price line aimed at infants and preschoolers declined 6 percent.

Mattel has looked to newer products to boost sales as children increasingly opt for electronic games and other gaming activities over traditional toys that are decades old.

Barbie made her debut in 1959, distinguishing herself in the mass market for dolls with her fashion model-like figure.

"(Barbie is) still a $1.2 billion business. It is still very meaningful for Mattel and it is very hard to grow a $1 billion business," Morningstar analyst Jaime Katz told Reuters.

In February, the company offered to buy Canada's Mega Brands Inc for about $460 million to compete with Denmark's Lego, the leader in the fast growing market for building blocks.

Earlier this month, Mattel launched a new line of toy guns called BOOMco.

Sales of its chubby-faced American Girl dolls grew 5 percent, slower than in recent quarters.

The decline in sales mostly reflects higher retail inventories entering the quarter and the timing of Easter, which falls in the company's second quarter this year, Stifel Nicolaus analyst Drew Crum wrote in a note.

Mattel's gross sales declined 10 percent in the all-important holiday quarter as shoppers spent less on discretionary items such as toys, especially the action figures and preschool toys that represent the largest categories for Mattel and rival Hasbro Inc.

Mattel reported a net loss of $11.2 million, or 3 cents per share, for the first quarter, compared with a net income of $38.5 million, or 11 cents per share, a year earlier.

Excluding items, the company earned 1 cent per share, below the average analyst estimate of 9 cents per share, according to Thomson Reuters I/B/E/S.

Gross margins fell 330 basis points to 50.9 percent.

Mattel's shares were down 2.3 percent at $37.01 in late morning trading on the Nasdaq. The stock had fallen about 20 percent this year to Wednesday's close.