Police put up a cordon around a TTC bus and along a section of Oakwood Avenue last February after a passenger was shot.Police put up a cordon around a TTC bus and along a section of Oakwood Avenue last February after a passenger was shot. (Mike Crawley/CBC)

A man charged with attempted murder after firing a gun last winter on a crowded Toronto bus has pleaded guilty and been sentenced to nine years in prison.

Richard Haynes, 29, was arrested two days after wounding a 17-year-old who was riding on the Toronto Transit Commission's Ossington bus, in the middle of the afternoon.

The bus was filled with passengers when Haynes opened fire, hitting the victim in the hip.

Court was told the shooting last February was in retaliation for the teen having stabbed Haynes earlier that day.

On Thursday, Haynes pleaded guilty before the start of a preliminary hearing.

The judge agreed with a joint submission from the defence and the Crown that Haynes be sentenced to nine years in prison.

A second man charged in the incident pleaded guilty to assault and was released from custody after being given credit for time served.