Marty Walsh’s administration, including his former Chief of Staff Dan Koh, dealt with a sexual harassment claim from Hilani Morales three years before she sparked a political firestorm with allegations against Felix G. Arroyo, WGBH News has learned.

Whereas Morales’s 2017 complaint led to the dismissal of Arroyo, Boston’s Health and Human Services chief, the earlier complaint resulted in the alleged harasser being transferred to a different city job, with no loss of status or salary.

The city’s handling of the Arroyo allegations is the subject of a pending lawsuit against the city for retaliation, and recently became an issue in Koh’s congressional campaign. Last week, in the final days of the 3rd Congressional District campaign, candidate and State Senator Barbara L’Italien accused Koh of treating Morales unfairly.

In the earlier case, Morales complained of being harassed by another City Hall employee, not as highly placed as Arroyo but closer to the Walsh organization: Leon Graves. Graves, a former probation officer and member of Walsh’s campaign team, held a job on the mayor’s staff as special assistant coordinating anti-violence strategies.

At the time, Morales worked in the Small and Local Business Office located in City Hall. Graves, too, worked in City Hall.

Several people familiar with the case, who asked not to be identified, say that it involved unwanted suggestive comments by Graves, and threats of retaliation if Morales complained.

In early May 2014 a preliminary investigation by Walsh’s Corporation Counsel found Morales to be “completely credible,” according to city employees familiar with the situation, and recommended further action.

Koh, according to sources familiar with the Graves incident, sat in on an interview with Morales as part of the Graves investigation.

Graves was subsequently transferred to a newly-created job as an aide to the Inspectional Services Department (ISD) commissioner—a position that re-located him to ISD offices at 1010 Massachusetts Avenue, where he would no longer interact with Morales.

Graves maintained a city salary of more than $100,000 in the new position, which he held until earlier this year when he was hired to another high-level position back in City Hall.

Although the Mayor’s press office told The Boston Globe in January 2015, that Graves was moved because he was “a talented employee whose skill set fit with what was required” at ISD, several city employees close to the situation say that it was to resolve the harassment complaint.

A year after Graves was transferred to ISD, Morales went to work for Arroyo at Health and Human Services. In a case that made front page headlines, Morales made allegations against Arroyo including inappropriate conduct and once grabbing her by the neck. Arroyo was fired, and this year Morales filed a lawsuit against the city in Suffolk Superior Court, alleging retaliation for bringing the complaint.

Koh, who was Chief of Staff for Walsh at the time, is mentioned in the Morales lawsuit.

Walsh’s office declined requests for interviews with the Mayor, and Corporation Counsel Gene O’Flaherty.

Spokesperson for Mayor Walsh Laura Oggeri said, “We are unable to comment on specific personnel matters; however it is always the Mayor's priority that everyone feels safe and welcome at work.”

Efforts to reach Graves at home and at work were unavailing. Morales could not be reached for comment. Several calls to Morales’ lawyers went unreturned.

Koh, through his campaign, declined comment.

With some provisional ballots still being counted, Koh appears to have lost the 3rd congressional district primary to Lori Trahan by fewer than 100 votes. On Friday, Koh requested a recount.

Correction: An earlier version of this story incorrectly characterized Dan Koh's status in the lawsuit filed by Hilani Morales against the City of Boston. Koh was mentioned in the suit.