For years, the mounds of rich, carefully sifted soil piled in a hidden depot in Mattapan were like manna to the city’s growing ranks of gardeners.

But the thousands of tons of finely ground compost massed in the woods off American Legion Highway are now off-limits to Boston residents hoping to use it to grow tomatoes, squash, or any of the hundreds of thousands of pounds of fruits and vegetables that come from gardens across the city.

For reasons city officials and scientists have been unable to explain, lead levels have more than doubled since 2005 in the compost that is collected every year from yards around Boston. This year, some samples taken from the piles have even exceeded state and federal guidelines for safe concentrations of lead.

DAVID L. RYAN/GLOBE STAFF

A front loader turned a pile of compost at the storage site in Mattapan. Since 1995, the amount of compostable material in Boston increased from 638 tons to more than 11,000 tons last year.

‘‘It’s very concerning,’’ said Betsy Johnson, president of the South End/Lower Roxbury Open Space Land Trust, who serves on the Boston Compost Council, a group of gardeners, scientists, and local officials investigating the cause of the elevated levels of lead.

Get The Weekender in your inbox:

The Globe's top picks for what to see and do each weekend, in Boston and beyond.

The highest concentrations of lead are often found near the drip lines of homes, where long-banned lead paint can fall from exterior siding during storms, or near the street, where the remnants of lead gasoline often remain. Other sources of lead in the area may be remnants of insecticides once sprayed on plants, fishing-line sinkers, bullets, stained glass, and the white circles on old tires.

Since 1995, when the city began collecting the waste, the amount of leaves, branches, grass, and other compostable material increased from 638 tons to more than 11,000 tons last year. The city began collecting yard waste to comply with state regulations that banned sending such material to landfills or incinerators. The compost is available free to city residents.

‘‘Right now we have no conclusive explanation for why lead levels have been rising, but we do know that we’ve certainly been collecting a lot more yard waste as we make an emphasis on reducing solid waste,’’ said Jim Hunt, the city’s chief of environmental and energy services, noting that this is the third year in a row that the city has withheld its compost from gardeners for safety reasons.

At low levels, lead can impair brain development in a child, cause behavior disorders, and harm vital organs. In high levels, it can lead to death.

City officials insist that gardeners have never been at risk from its $700,000 yard waste collection and composting program, which they said helps offset the city’s overall waste disposal costs.

They note that the most recent tests of the compost this spring found mean lead concentrations of 260 parts per million, below the state’s safety limit of 300 parts per million and the federal standard of 400 parts per million. But that was more than double what city officials found in 2005, and some samples taken this year showed concentrations of as much as 480 parts per million of lead. The city’s mean lead concentrations last year were 299 parts per million.

Gardeners and scientists say the state and federal standards lag behind those set by the European Union, in which environmental officials recommend that compost with lead concentrations of more than 150 parts per million not be used in gardens.

Local gardening groups said they advise against using any compost with more than 200 parts per million of lead.

They also note that the US Centers for Disease Control and Prevention in May lowered by half the amount of lead in children’s blood that should be considered harmful. Lead poisoning is now defined as 5 micrograms of lead per deciliter of blood, down from 10 micrograms. An estimated 450,000 children suffer from lead poisoning in the United States, about 8,000 of whom live in Massachusetts.

‘‘We want to be as conservative as possible when it comes to applying the standards of the garden, to make sure they pose as little risk as possible,’’ said Valerie Burns, president of the Boston Natural Areas Network, which oversees 172 gardens with about 4,000 plots in the city.

She noted that gardens with elevated levels can be dangerous, especially for children. She advises urban gardeners to wash their hands, wear gloves, avoid digging more than 6 inches, and to keep shoes worn in the garden outside their homes. Children typically contract lead poisoning by ingesting dust or particles from their hands.

‘‘The last thing we would want to do is to add lead to our gardens with compost,’’ she said.

Leon Bethune, director of environmental health for the Boston Public Health Commission, added that root crops such as carrots, radishes, and parsnips can absorb lead as they grow.

‘‘We wish to be as protective as we can reasonably be, particularly when people are growing vegetables,’’ he said. ‘‘It’s best to keep exposures to lead as low as reasonably possible. There may be no safe level.’’

Several local scientists studying the elevated lead levels in the city’s compost said they have all but ruled out that it was blown onto the property at the depot, as lead concentrations were higher inside the piles of dirt than on their periphery. Studies have shown that even clean soil brought to gardens from elsewhere can end up contaminated within a few years by windblown dust or dirt splattered by rain.

Dan Brabander, an associate professor of environmental geochemistry at Wellesley College, working with the Boston University School of Public Health, said he is trying to map the sources of the compost to determine the origins of the lead.

‘‘What we can say now is that the soils are a long-term reservoir for lead,’’ he said. ‘‘As more urban soil becomes exposed, especially in very dry conditions, the fine particles become breathable, and are easily transported by wind. With more bare soil, and more of it dry, there will be a greater source for lead.’’

Apple D’Or, a Southborough-based contractor, oversaw the waste collection and composting depot from 2003 until this spring, when the city fired the company.

City officials, in an e-mail response to questions, said they ended the contract because Apple D’Or failed to provide sufficient space for the city’s yard waste. The city said it has hired a new contractor from Woburn that will try to improve the quality of the city’s compost by mixing it with food waste and yard debris from other communities.

Last year, the state cited Apple D’Or for violating environmental rules on how to operate a compost operation at a nearby site on state Department of Conservation and Recreation land. Officials from Apple D’Or could not be reached for comment.

Wendy Heiger-Bernays, an associate professor of environmental health at the Boston University School of Public Health, noted that the lead levels have increased during the same time the contractor oversaw the city’s compost facility. But, she said, ‘‘from the existing data, we cannot determine the exact cause of the increase.’’

At the compost depot in Mattapan last month, Robert DeRosa, the city’s superintendent of sanitation, explained how the city sifts through the yard waste and lets it sit for months for the vegetation to decompose. Then it uses front loaders to mix up the compost. It takes about two years before it is ready to be delivered to a garden.

As the trucks dug through the large mounds of dirt, DeRosa said he understood gardeners’ reservations and noted that all of the compost would be cleared out in the coming months to make way for newyard waste.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.