Mayoral candidate Martin J. Walsh today released what he called a comprehensive platform to protect gays and lesbians, including designated “safe spaces” for gay youth in schools, transitional housing for homeless youth, and better training for police officers who handle domestic violence.

Walsh unveiled the policies at his Jamaica Plain field office, as he stood with several gay and lesbian supporters who said he was a crucial behind-the-scenes player in the fight to defend gay marriage in the state Legislature.

Wearing a rainbow-colored campaign sticker, Walsh, a state representative, said he is somewhat frustrated by the perception that, because he is a former trade union official from Dorchester, he may be more socially conservative than his opponent, Councilor at Large John R. Connolly. He and his gay and lesbian supporters said he has always been a staunch advocate of same-sex marriage, as well as transgender rights legislation, HIV and AIDS programs, and gay and lesbian youth services.

Advertisement - Continue Reading Below

Arline Isaacson, co-chairwoman of the Massachusetts Gay and Lesbian Political Caucus, said that when many lawmakers were fighting to ban same-sex marriage in Massachusetts after it was legalized by the Supreme Judicial Court in 2004, Walsh lobbied his more conservative colleagues not to support the ban. She said Walsh took 25 votes over seven years to defend gay marriage, even though his church and many of his constituents opposed such unions.

“He jumped into the trenches, literally, and he fought side-by-side with us, and he did so at great political cost,” Isaacson said. “He was, literally and truly, a profile in courage.”

State Representative Elizabeth Malia, a Jamaica Plain Democrat who is openly gay, echoed the sentiment, saying, “He was an instrumental part of that victory for our community.”

Walsh’s platform includes the creation of “comprehensive, age-appropriate,” sex education programs in middle and high schools, the hiring of a liaison to the gay community in the Boston public schools, and the development of a city policy to protect transgender students.

“We’ve come a long way in this city,” Walsh said, “but we still have a long way to go.”