The man's grandmother called 911 and identified him as the attacker after she was injured trying to stop him, prosecutors said.