WASHINGTON – Candidates for office can use campaign funds to pay for child care in certain cases, the Federal Election Commission ruled on Thursday in a case heralded by some activists as a victory for working women.

First-time congressional candidate Liuba Grechen Shirley, a Long Island Democrat, had petitioned the FEC for permission to pay her babysitter out of money donated to her campaign. Grechen Shirley, who previously cared for her children full time, argued that she only needed the sitter for her bid for office and that the payment therefore constituted a campaign expense.

Women’s advocates got behind her, including Hillary Clinton, who wrote a letter to the FEC on Grechen Shirley’s behalf. On Thursday, the commission ruled 4-0 in her favor.

“I’m thrilled. It’s a game-changer,” Grechen Shirley, 36, said shortly after the decision was announced. “I hope that this ruling today inspires more women to step up and run for office.”

FEC spokesman Myles Martin said that the last time the commission took up the question of paying for child care out of campaign donations was in 1995. Rep. Jim McCrery, a Louisiana Republican, got permission to spend campaign funds on occasional babysitting when his wife needed to travel with him as what he called an “integral” part of his campaign.

Grechen Shirley is one of several Democrats seeking to unseat Rep. Peter King, the Republican incumbent in New York’s 2nd District. She said she was motivated to run for office by her opposition to President Donald Trump’s ban on travelers from certain Muslim countries and other policies that King supports. But she initially hesitated because of her family commitments.

She was the full-time caregiver for her two small children – a 3-year-old daughter and 2-year-old son – while working during their naps and after bedtime as a part-time consultant for nonprofit groups.

“I had no intention of running for office,” she said. When neighbors starting urging her to run, she said, “I really didn’t think that I could, with two babies.”

But in October, she declared herself a candidate. She made phone calls to prospective donors each day while walking her son in his stroller, hoping he would fall asleep, she said. Within two months, she said, she had raised $126,000 and started hiring campaign staff.

She has so far raised $326,575, according to her latest FEC filing. She employs a campaign manager, a financial director, financial assistant, three field organizers and a number of consultants. And at the beginning of March, she added another member to the staff: a babysitter.

“She’s an integral member of the team, just as important as the campaign manager and the finance director,” Grechen Shirley said of her 17-hour-a-week babysitter. As she spoke to The Washington Post on Thursday, she was walking her son in his stroller while her daughter ran up to show her a book.

Grechen Shirley’s petition to the FEC got a boost with the letter from Clinton, sent through two of her lawyers.

“Denying Ms. Shirley’s request,” the letter said, “would . . . discourage young mothers from seeking elective office, and deprive parents of ordinary means of the opportunity to serve. . . . For young mothers like her, the ability to seek office hinges on access to child care.”

Grechen Shirley, who will compete in the New York primary on June 26, is among a large contingent of women running for office across the country this year. Several are emphasizing their identity as mothers of young children. Candidates in Maryland and Wisconsin even breast-fed their babies in their campaign ads.

Women already in office also are asserting their maternal rights. Earlier this year, the Senate agreed to change its rules so Sen. Tammy Duckworth, D-Ill., the first woman to give birth while serving in the legislative body, could bring her infant to the floor while she casts votes. District of Columbia Council member Brianne Nadeau, pumped breast milk on the dais during a six-hour hearing in December.

These images of motherhood can both help and hurt female political candidates, said Amanda Hunter at the Barbara Lee Family Foundation, which aims to promote women in politics. Her organization conducted a study in 2016 asking participants for their reaction to a variety of fictional candidates from different family situations, such as a single mother or a married father.

The study found that voters responded positively to portrayals of children in campaign ads, because they conveyed authenticity and understanding of typical families’ issues. But the same voters expressed concern when it came to female candidates with young children – particularly about who would care for the children while she is campaigning.

“Women candidates are walking a tightrope,” Hunter said. “Voters have a lot more scrutiny when it comes to women candidates than they do when it comes to male candidates.”

She said it will take further research to tell whether the increasing number of female candidates, especially those running for office while their children are young instead of waiting until they are adults, changes those perceptions.

“What we’re seeing this year is this surge of women stepping up with a sense of urgency – they feel like they can’t wait. The time is now. They have to step up,” Hunter said.

Grechen Shirley said she has run into the same voter concerns reflected in a survey while on the campaign trail. She explains that her mother plans to retire and would help provide child care.

She knows she’s changing the perspective of at least one future voter: her daughter, who recently saw a podium and ran to it to give a speech, emulating her mother. Because now, she thinks running for Congress is what mommies do.