PLAISTOW, N.H. (AP) — Police say a New Hampshire man is accused of threatening a Massachusetts commuter rail conductor with a knife.

Police say 28-year-old Eric Foster of Plaistow was asleep on the Massachusetts Bay Transportation Authority train on Aug. 9 as it pulled into the station at Haverhill, Mass. It had started from Boston.

When the conductor tried to wake him, Foster allegedly pulled out a knife and shouted racial slurs at him. The conductor called police but Foster left.

On Tuesday, the same conductor noticed Foster trying to board the train in Boston. He refused to let him on, and police arrived to arrest him.