What started off last spring as an effort by an Aurora Girl Scout troop to take on a social service project turned into passage Monday of Colorado’s first ban on smoking in a vehicle while children under 18 are inside.

The Aurora City Council passed the measure on a razor-thin 6-5 vote, putting smokers and drivers in the city of 360,000 on notice that tobacco or marijuana smoking and vaping while a minor is along for the ride could result in mandatory community service — or even a $150 fine.

Looking on from the audience Monday night were the five girls of Troop 60789 — four of them 13 years old and one 14. They never thought an idea they first kicked around in May to earn their Silver Award — the Girl Scouts’ second-highest honor — might result in real on-the-ground change.

“We were brainstorming ideas on how to stop it,” Amelia Malchow said of her troop’s nascent notion to outlaw smoking in a car with juveniles present. “We knew at the time it was a bit far-fetched.”

But not so far-fetched that when the idea began to gel that the girls’ project might best be put to practical effect in the form of a new city ordinance, the troop never lost sight of the finish line.

“They were passionate about the cause,” said troop leader Kristen Batcho. “Once they started doing more and more research and learning about the health effects of secondhand smoke, that made them more passionate.”

Amelia, who, along with four of her troop members, attends Prairie Middle School in Aurora, said it was important to her and her peers that they try to protect some of society’s most vulnerable members — those with no vote, and in some cases, no voice.

“Secondhand smoke affects children more because they are still growing,” she said.

But to turn a mere notion into legislation, the Scouts realized they needed an advocate on the City Council. They found that ally in Councilman Charlie Richardson.

“When you talk about secondhand smoke in a very confined space like a vehicle, it’s like secondhand smoke on steroids,” Richardson said. “Protecting kids is absolutely the driving force behind this.”

Richardson encouraged members of Troop 60789 to gather as much information as they could about the dangers of secondhand smoke and come back to council with a presentation.

The girls found that other states, such as Arkansas, Vermont and California, had passed similar laws. But despite Colorado’s long-time prohibition on smoking inside restaurants and bars, there is no law in the Centennial State against smoking in a car carrying children.

Richardson consulted with the city attorney on the right language for an ordinance and brought the measure to his colleagues two weeks ago. After making some changes to the ordinance — such as replacing a mandatory $150 fine with an initial punishment of community service and making the smoking violation a secondary offense rather than a primary one — the City Council unanimously passed the ordinance on first reading.

“This is not a heavy-handed, punitive measure,” Richardson said.

But several council members disagreed Monday, with Councilwoman Francoise Bergan saying the measure was government overreach.

“Passing a law like this is a bridge too far,” she said.

Others brought up concerns that the law might lead to targeting by police of minorities or those with lower incomes, who they said smoke at higher rates than the general population.

The ordinance won the praises of the Tri-County Health Department, which penned a letter to the council urging it to approve it. Maura Proser, public health policy and prevention manager with Tri-County, said there is no doubt that secondhand smoke in the confines of a vehicle is a public health hazard.

“The smaller the space, the more concentrated it’s going be,” she said. “It’s about protecting children — they don’t get a say in how or when they travel.”

Proser said she wasn’t surprised that it was a Girl Scout troop that made a measure like the one passed Monday a reality.

“I wasn’t surprised because of the precedent of youths coming together and making a difference,” she said.

Just last week, the state Supreme Court announced it will review a case spearheaded by a Boulder teen that would require that oil and gas regulators consider public health and the environment as paramount when issuing new drilling permits.

Xiuhtezcatl Martinez was among a group of teens who first brought an anti-fracking campaign to state regulators in 2013, when Martinez was about the same age as the girls in Troop 60789.

Batcho, the troop leader, said she is proud of her Girl Scouts and the way they took on the challenge of passing a new municipal law — “They jumped in with two feet” — and can now relish a job well done.

“They did not know how powerful and impactful this could be,” Batcho said. “It’s a good thing to show young girls that you can make a difference.”

In the end, Mayor Steve Hogan voted in favor of the ordinance, breaking a 5-5 logjam. The Girl Scouts covered their mouths and smiled broadly seconds after the vote was cast.