The attack was not a random incident, according to transit police.