A Brooklyn man was convicted of first-degree assault as a hate crime in connection with an attack on a transgender woman last year that left her with a traumatic brain injury, the authorities said on Friday.

The defendant, Mashawn Sonds, 26, of Brownsville, attacked the woman, Kimball Hartman, 29, as she walked down Bushwick Avenue in Bushwick with a gay male friend on the night of Oct. 1, 2014, according to a statement from the office of Ken Thompson, the Brooklyn district attorney.

Mr. Sonds approached the woman and her friend yelling antigay slurs and then picked up a two-by-four piece of plexiglass and swung it at her, according to prosecutors.

As Ms. Hartman tried to escape, they said, Mr. Sonds threw the plexiglass at her, striking her in the back of the head.