Lego said Tuesday that it will stop using plastic bags inside its boxed sets and replace them with paper ones.

The Danish toymaker said it will start making the switch next year and expects plastic bags to be phased out in the next five years. The bags are used to hold loose bricks in boxed sets.

Lego and other big brands have been looking for ways to cut plastic use to please customers increasingly worried about how their purchases affect the environment. Monopoly maker Hasbro, for example, has also announced plans to eliminate plastics in its packaging.

Among the environmental issues posed by plastic is that it breaks down into tiny pieces that can be eaten by birds or other wildlife, endangering their health.

Lego’s colorful bricks are also made of plastic, but the company has had trouble finding another material that’s as durable. About 2 percent of its pieces, such as Lego trees and bushes, are made of sugar cane.

Lego said some kids wrote to the company asking it to drop the plastic bags.

“The passion and ideas from children inspired us to begin to make the change,” Lego chief executive Niels Christiansen said in a statement.

The paper bags, which are recyclable, are also easier for kids to open, the company said.