AUGUSTA, Maine — Campers headed to Maine from other states wouldn’t be allowed to bring their own firewood under a proposed law headed toward passage in the Legislature.

Lawmakers want to protect Maine from destructive bugs that have wiped out huge swaths of trees in other states. The insects can enter the state through infested firewood.

Legislators and other state officials fear widespread infestations could harm production of lumber and maple sugar, affecting as many as 25,000 workers in Maine, while leaving ecological and visual scars on the woodlands of the nation’s most heavily forested state.

They are particularly concerned about Asian long-horned beetles, which tunnel and lay eggs in maple and other hardwood trees, and emerald ash borers, which burrow into ash trees.

Rep. Jeff McCabe said his bill, which has received initial House and Senate approval, directs state forestry officials to draft rules that close Maine’s border to firewood brought in by campers and sets up a mechanism to collect firewood brought into the state near the border. The law would likely cover commercial importation of firewood. It exempts wood that is kiln-dried, or treated to prevent pests.

Legislators in other states have taken similar action; New Hampshire and Vermont have approved less-stringent measures.

Such a law should not come as a shock to many Maine campers, said Rick Abare, executive director of the Maine Campground Owners Association.

Abare said his 210-member group has been working with state officials for three years to pass the legislation, and has been educating campers in the meantime about the need for the restriction. Campground owners, whose properties generally include woods, understand the threat of a serious bug invasion, he said.

“This is the Legislature ratifying what’s already known by the business community and the public,” Abare said.

McCabe, D-Skowhegan, envisions a strong educational effort to get the word to out-of-state campers that they must leave their firewood at home.

With nearly 18 million acres of forests, Maine has the highest percentage of wooded land — 90 percent — of any state, according to the state Forest Service.

Maine state entomologist Dave Struble said Asian long-horned beetles don’t kill trees immediately, but weaken and degrade their wood over several years. Over time, that affects lumber quality, maple sugar production and tourism — just a few industries that would be harmed, he said.

Damage from emerald ash borers is more immediate, Struble said. They attack ash trees, valued by furniture makers, boat builders and people who enjoy their shade along city streets and in parks.

“To the best of my knowledge, there’s been no resistance to this bug,” Struble said. “It would be like losing the elms.”

Importation bans like the one Maine is considering are aimed at halting the movement of the bugs, which have struck with a vengeance in Massachusetts, especially the Worcester and West Boylston areas.

“They will not move in nearly as rapidly as they can do it in the back of a car going 65 miles per hour,” Struble said.

Out-of-state firewood represents a huge volume of what’s carried into Maine campgrounds. There are 20,000 campsites in the state, and on a given night 40 percent to 50 percent of the campers are nonresidents, Abare said.

While there’s no official estimate on the volume of imported firewood, Struble believes “it could easily be tons.”

But many campers already have grown accustomed to buying bundles of firewood sold at campgrounds or from property owners who live near campgrounds, he added.

A few states, including New York and Pennsylvania, have banned the importation of firewood that is not heat-treated. Several Midwest states also have regulations addressing firewood movement.

In northern New England, New Hampshire prohibits out-of-state firewood onto state parks and campgrounds and the White Mountain National Forest. Vermont bans out-of-state firewood in the Green Mountain National Forest, and does not allow wood from more than 50 miles away into its state parks and campgrounds.

Maine already discourages the movement of firewood by more than 50 miles within the state as a protection against other regional diseases, Struble said.

Both Canada and the United States have barred imports of firewood from each other, Struble said.