The city of Westbrook has agreed to pay $100,000 to settle a gender discrimination lawsuit brought by two female police officers who accused male supervisors of a pattern of discrimination dating to 2011, when they were the only women on the force.

The officers, Sandy Mailman and Melissa May, agreed with the city on Wednesday to dismiss their lawsuit first filed last Dec. 2 in state court and subsequently moved to U.S. District Court in Portland late last year, according to a federal court filing.

Under the terms of the settlement, Mailman and May, who remain on the Westbrook Police Department force, will each receive $30,000 and the city will pay another $40,000 to cover their legal expenses in bringing the suit.

An attorney for both women, Rebecca Webber, said Thursday that the moving force behind the settlement agreement was to address past discrimination against female officers in the department. She acknowledged that, since the discrimination took place, the department has changed under a new female police chief.

“Due to the pressure exerted by this litigation and the courage of these two officers, as well as the new leadership and change in the form of Chief Janine Roberts, the department has made enormous steps forward,” Webber said in an email. “The goal of the agreement was to keep the momentum moving toward the elimination of gender inequity in any form in the department.”

An attorney for the city of Westbrook, Edward Benjamin Jr., agreed that the work culture of the department has improved since Mailman and May first filed a notice of intent to sue the city in 2014.

“When the case first started, (Mailman and May) weren’t confident they were going to stay in the workplace,” Benjamin said by phone Thursday. “They think things have improved under Chief Roberts.”

Benjamin said the discrimination claims brought by Mailman and May were all incidents that occurred before Roberts became chief in 2014.

“When you start a new regime like Chief Roberts, unfortunately, you inherit a lot of things when you are walking in the door,” Benjamin said.

May claimed in the lawsuit that the discrimination against her began after she issued a speeding ticket on Jan. 15, 2014, to the girlfriend of a male coworker, Officer Benjamin Hall. Afterward, male officers began to refer to her by a gender slur, according to the lawsuit.

Part of Mailman’s claim states that she was retaliated against after reporting that supervisors used the derogatory language to describe May and that the subsequent treatment by male supervisors created a hostile work environment. She also claims that she was singled out starting in 2011 because of her gender, including being denied overtime pay that was allowed for male officers.