(Reuters) - Mattel Inc MAT.O reported a surprise loss for the holiday quarter on Thursday, as the toy maker faced weak demand for key brands including Fisher-Price and as the effect of the collapse of Toys "R" Us lingered.

FILE PHOTO: Mattel's Barbie doll is seen on display at the 114th North American International Toy Fair in New York City, U.S., February 21, 2017. REUTERS/Stephanie Keith/File Photo

Shares of the biggest U.S. toy maker fell 7.3 percent to $14.20 in after-hours trading.

Mattel reported a net loss of $281.3 million in the fourth quarter ended Dec. 31, hurt by a one-time, $457-million charge related to new U.S. tax laws.

Excluding one-time items, Mattel reported a loss of 72 cents per share, while analysts on average had expected earnings of 17 cents per share, according to Thomson Reuters I/B/E/S.

El Segundo, California-based Mattel has faced weak demand in recent years for its most well-known products including Hot Wheels and Barbie as children increasingly prefer videogames and electronics over traditional toys. The company’s stock fell 44 percent last year.

The September bankruptcy of major toy retailer Toys “R” Us, while highlighting the struggles facing the industry, heaped more pressure on Mattel and other toy makers to find other outlets for sales. In response, Mattel scrapped its dividend payout to free up cash.

Sales in the company’s construction, arts and crafts unit that includes Lego competitor Mega Blocks sank 25 percent in the holiday quarter, while sales from Fisher-Price toys dipped 12 percent.

Mattel’s gross margin — gross profit as a percentage of revenue — fell to 32 percent from 47 percent in the year-earlier quarter, as advertising costs shot up 18 percent.

Mattel has attracted takeover bids from rival Hasbro Inc HAS.O, which it has snubbed.

Hasbro has fared better after snagging the rights to sell toys modeled on Disney princesses, when Mattel's Disney DIS.N contract expired last year.

The two toy makers have also been competing for lucrative contracts with Hollywood studios in the past few years as demand for traditional toys falls.

Still, Mattel’s Barbie made a comeback in the holiday period as sales from the iconic brand rose 9 percent after four quarters of declines.

Efforts to revitalize the line of dolls, including changes to skin tones and adding plus-sized and hijab-wearing models appeared to be paying off.

Mattel’s net revenue fell 12.1 percent to $1.61 billion, missing analysts’ average estimate of $1.69 billion.