Last year, Shenika Carter was part of the tidal wave of ordinary people jumping into politics for the first time. But over and over again in her campaign, for a county assessor slot in the suburbs of Denver, she hit the same obstacle: the staggering cost of child care.

“There were times I couldn’t show up on the campaign trail,” she said. “And I know it cost me votes.” After Carter lost, she decided to stay involved in politics behind the scenes, where she would have more flexibility to care for her three young children plus her teenage stepdaughter. “When I have the right access to child care, then I can be the candidate again.”

That may come to happen sooner than she expected. Last week, Colorado became the second state in the country to pass a law that gives candidates the explicit right to spend the money supporters donate to their campaigns on child care. The first was Utah, which passed a similar law that took effect on Tuesday.

Both laws are a reaction to the growing number of candidates — mostly mothers — who have demanded that the nation’s archaic election rules catch up with the changing nature of campaigns.

State election commissions have given a handful of candidates permission to spend campaign donations on child care. But Utah and Colorado are the first states to pass laws, relieving candidates of the need to ask permission individually and draw special scrutiny to their campaigns.

Democratic Gov. Jared Polis’ office did not respond to a request for comment, but the bill’s sponsors say they anticipate he will sign the bill in the coming weeks.

Both laws are broader than the recent election commission rulings in significant ways. Utah’s law makes it possible for sitting lawmakers to use reelection funds to pay for child care during the legislative session. The Colorado bill permits candidates who are caring for an older family member to use campaign funds for elder care.

Their only major requirement is that the care must be related to the campaign. That’s in contrast to the Federal Election Commission’s guidelines, which allows candidates to spend campaign funds only on child care they wouldn’t need if they weren’t running for office. If a working parent paid for daycare before running for office, for example, he or she couldn’t bill those same daycare hours to their campaign after joining the race, but they could use campaign funds for babysitting during night and weekend events.

“We wanted to make the possibilities as broad as possible,” said Rep. Craig Hall (R), who introduced the legislation in Utah. “There are so many wonderful individuals in this state who want to run for office, and it shouldn’t be discouraging for them if they have young children.”

Sponsors of both bills emphasized that their proposals would apply to any parent or guardian in need of child care, and not just to mothers, who have been the focus in other states. Colorado’s legislation was sponsored by two men and two women, including one representative who just became the father of a newborn. Hall, a Republican who sponsored the legislation with Democratic Rep. Stephanie Pitcher, ran his first campaign with four young children at home.

The sponsors said they especially hope it will enable more women of diverse economic backgrounds to run for office. Pitcher pointed out that Utah has one of the lowest rates in the country of women elected to state and local office.

“I’ve been training women to run for office since 2005, and generally one of the first questions women ask me is, can they have a family and do this?” said Faith Winter, the state senator who co-sponsored the Colorado bill and a leader with VoteRunLead and Emerge Colorado, two groups that recruit Democratic women for elected office. “And the answer is ‘Yes, and it’s hard.’”