Just a few months after Denmark’s Lego dethroned El Segundo’s Mattel Inc. as the world’s biggest toymaker by revenue, Mattel this week took another hit: On Monday, rival Hasbro Inc. of Pawtucket, R.I., surpassed Mattel’s market cap, becoming the most valuable publicly traded toy company.

Mattel’s market capitalization, or the total dollar value of outstanding company shares, of $7.7 billion was surpassed by Hasbro’s market cap of $7.8 billion. By market close on Wednesday, Hasbro was still in the lead at $7.9 billion to Mattel’s $7.8 billion.

The shift has less to do with Hasbro’s success than with Mattel’s struggles. While Hasbro shares have gained 14 percent over the past year, Mattel shares are down 42 percent amid slumping sales and weak demand for its core brands, including the company’s iconic Barbie.

Those dismal financials were most obvious in Mattel’s fourth quarter last year, when it reported net income of $150 million, a decline of 60 percent from the same quarter a year earlier. For the full year, Mattel’s net income of $499 million was down 45 percent from 2013, and sales slid 7 percent to $6 billion.

Last month, Mattel announced it would lay off 107 employees from its El Segundo plant. The layoffs, which covered a wide range of positions including several managers, senior managers and directors, were to start March 12 and continue into next month.