BROOKLYN - A Brooklyn teen was sentenced Tuesday to 12 years in prison after being convicted of killing a man on a city bus in 2014.

Kahton Anderson, 16, was found guilty of second-degree murder and attempted assault earlier this year. 

Prosecutors say the then-14-year-old was shooting at rival gang members on the B15 bus in Bed-Stuy during the evening rush when he ended up hitting 39-year-old Angel Rojas in the back of the head.

Anderson's lawyers argued he only pulled the trigger in self-defense. 

Anderson was charged as an adult in the case and will be spending at least 12 years behind bars.

Rojas' widow, Maria, fought back tears in court as her friend read out a statement.

"This senseless shooting robbed my son of his father, his role model, teacher and best friend," the statement said.

Rojas' son, Saury, told News 12 that after the shooting he was not able to take public transportation for a year.