To a child on the prowl for sweets, that brownie, cookie or bear-shaped candy left on the kitchen counter is just asking to be gobbled up. But in states that have legalized marijuana for recreational use, notably Colorado, that child may end up with more than a sugar high.

A study published Monday in the journal JAMA Pediatrics says that in Colorado the rates of marijuana exposure in young children, many of them toddlers, have increased 150 percent since 2014, when recreational marijuana products, like sweets, went on the market legally.

When children get their hands on the goodies they can become lethargic or agitated, vomit and lose balance, triggering a hospital visit or a frightened call to a poison center. A handful of patients were admitted to intensive care units and intubated.

Rates had started climbing in 2009, when the federal government said it would not prosecute users and suppliers who conformed to Colorado’s medical marijuana laws. Those patients would often ingest their prescription marijuana through baked goods.

When voters decided in 2012 to legalize marijuana for recreational use, researchers anticipated that rates of accidental exposure in children would rise.

“But we were not prepared for the dramatic increase,” said the senior author of the study, Dr. Genie E. Roosevelt, an associate professor of emergency medicine at the University of Colorado School of Medicine and Denver Health Medical Center.

The number of cases in the study, drawn from Colorado’s poison control data and from one children’s hospital, is modest. Between 2009 and 2015, there were 163 cases documented by the poison control center and 81 patients evaluated at one hospital for pediatric marijuana exposure.

Even so, Roosevelt said, “While these ingestions are not common, the effects are significant and preventable.” Some cases, she said, could result from secondhand smoke inhalation. The documentation of cause is still evolving.

During that period, marijuana-related child poison control cases in Colorado rose 34 percent each year, compared with a 19 percent annual increase in other states.

“The study is not an argument for or against legalization,” said Robert J. MacCoun, a professor at Stanford Law School who writes about drug policy. “But it’s an argument for smart regulation,” he said, noting that many products are packaged not only in bright, alluring colors, but also in highly variable doses.

Nationally, at least 23 states have passed legislation allowing marijuana for medical use. Colorado and Washington have also decriminalized marijuana for recreational use, allowing products to be sold to people 21 and older. Alaska, Oregon and Washington, D.C., have also passed recreational-use laws.

Colorado, which received close to $588 million in revenue from recreational marijuana in 2015 (plus some $408 million from medical marijuana sales, which also include edibles), is struggling to contain the unintended consequences of its booming new industry. Last week, the town of Hugo ordered residents to stop drinking tap water because the municipal supply had tested positive for THC, the psychoactive chemical in marijuana.

As of 2015, Colorado has required marijuana products to be sold in childproof packaging. This month, the so-called gummy bear law went into effect: Edible marijuana may not be rendered in the shape of humans, animals or fruits, which had made them so irresistible to children.

Consistency of dosing and portion size remain problems. Dr. Kari L. Franson, an associate professor at the University of Colorado Skaggs School of Pharmacy, noted that edible marijuana, such as candy bars or brownies, typically contain several servings. “But what kid doesn’t eat an entire brownie?” she asked. “And you know the toddler doesn’t read the label.”