TAMPA — For several days, Tampa police sought a man who tried to rob two people at gunpoint Sunday. They posted a surveillance video of him running with a gun through the Channelside parking garage. They alerted other agencies.

James Goodman, 34, and Christopher Gurrie, 31, said they had no money, and the gunman replied, "I'll shoot you," police said. The two men insisted they had no money, and the gunman ran.

It is unclear whether another person aided in his escape, and the investigation is ongoing, said police spokeswoman Laura McElroy. No one was injured, and nothing was stolen in the attempt.

This is how police say they traced the crime to McDonald:

On Thursday, McDonald was at school at East Bay High in Gibsonton, attending his IMPACT class, a course designed to help students at risk of dropping out catch up on their course work so they can graduate.

In IMPACT, each student has a computer. The teacher can see what's on their screens from his computer, and that day the teacher noticed a police bulletin on McDonald's screen. The bulletin had a picture, and McDonald was showing it to another student, said school district spokeswoman Linda Cobbe.

The teacher walked over and asked him, "Is this you?"

McDonald said no, and closed out of it, Cobbe said. The teacher called the school resource deputy, who alerted Tampa police.

McElroy said officers were able to trace back sites he visited to confirm he was looking at Tampa police's bulletin about the armed robbery.

They took McDonald to police headquarters and picked up his mother from her house, simply telling her that they needed her to look at a video. In a separate room at district headquarters, they played the surveillance video that showed a person running down a parking garage ramp, holding a gun wrapped with a red bandana.

She immediately identified him as her son, McElroy said.

"This is a woman who has dedicated her life to upholding the law, so for her to find out her son was involved in a criminal offense was absolutely devastating," McElroy said. "To say that she was devastated is really not even adequate. … She was extremely upset. She was very shocked."

McDonald was arrested and taken to the Orient Road Jail. He was charged with two counts of attempted robbery with a weapon and released Friday on a $15,000 bond. Florida Department of Law Enforcement records reflect no other arrests for him.

At first, police thought the attempted robbery might be gang-related because of the red bandana around the gun. Officers forwarded the video to the gang squad's supervisor, who responded that the bandana alone wasn't meaningful.

He checked their database of known gang members and associates and found only one person who loosely fit the description. They later determined that man was not involved. Police don't believe the incident was gang-related, but they won't rule out the possibility until the investigation is complete, McElroy said.

As an officer with the gang squad, Peterson wouldn't necessarily have seen the bulletin about the armed robbery, McElroy said. It would have been reviewed by the gang squad's supervisor and by patrol officers.

Police haven't recovered the gun yet. McElroy said it could not have been Peterson's police weapon, because she has been coming to work with it.

In Peterson's personnel record with the city, supervisors describe her as respectful, personable, reliable, thorough and fair.

McElroy said her file with the Police Department includes three letters of appreciation, including one for her work investigating an armed robbery.

Times news researcher John Martin contributed to this report. Jessica Vander Velde can be reached at jvandervelde@sptimes.com or (813) 226-3433.