Police said they got a break in the case when they looked at surveillance video from the Jackson Square MBTA Station. The men used the victim's credit card to buy a Charlie Card, police said, not realizing the camera overhead got a clear shot of both of their faces.

Police released the men's photos, and officials said within hours they knew who they were looking for.

The victim, a 38-year-old postdoctoral fellow, was attacked at about 8:32 p.m. at the corner of Pleasant and Browne streets. He was treated for two superficial stab wounds at Beth Israel Deaconess Medical Center.

The suspects were both held without bail after their arraignments in Brookline District Court on Friday.

Lawyers for Boston Marathon bomber Dzkokhar Tsarnaev rested their case in his federal death penalty trial Tuesday after presenting a brief case aimed at showing his late older brother was the mastermind of the 2013 terror attack.