The alleged assault occurred in Somerville, said Deputy Chief Paul Upton outside the courtroom. Gomes lives in Somerville, Upton said.
Gomes was arrested Thursday morning after a woman reported an assault. Police Chief Michael Cabral said the incident is alleged to have happened earlier in the week.
In court today, Gomes' lawyer asked that the case be transferred to another district court. Gomes must give up his department-issued firearm.