A federal judge last week tossed out a former Falmouth teacher’s lawsuit that claimed her contract was not renewed because of the breaks she took to pump breast milk.

Shana Swenson, 34, of Portland sued Falmouth Public Schools on May 10, 2019, in U.S. District Court in Portland alleging that she was discriminated against and lost her job because she took three breaks a day to express and save breast milk after returning from maternity leave.

The school district said that Swenson, who was a probationary teacher between 2015 and 2018, was not rehired because of poor classroom performance reviews.

U.S. District Judge George Singal disagreed with Swenson and on Thursday, granted summary judgment to the school district and dismissed Swenson’s complaint. He found that between September 2016 and June 2019, 19 employees at Falmouth Elementary School, where Swenson worked, took leaves.

A dozen of those staff members took maternity leave, Singal said in his 25-page ruling. Seven of them, like Swenson, were on probationary contracts. Among these employees, only Swenson was not offered a contract in the years after taking leave, the judge found.

“All staff members who took maternity leave and returned to work while [Gloria] Noyes was principal at [the elementary school] requested and were granted break time to nurse or pump breast milk,” Singal said.

The judge said there was ample evidence that the principal and the district have a practice of supporting pregnant and nursing employees.

A request for comment from Swenson’s Boston attorneys was not immediately returned over the weekend.

Portland attorney Melissa Hewey, who represented the school district, told the Portland Press Herald that Singal’s decision was “a complete vindication.”

“What is important about this decision is that it supports what we’ve been saying,” Hewey said. “There’s no doubt on this record that Falmouth is very supporting to nursing mothers and people who take maternity leave.”