Police say Hector Dominguez was first spotted in the area of Martin Luther King Jr. Elementary School earlier this week.
A woman contacted police, claiming Dominguez was exposing himself to students as they walked to class. When the woman contacted him, the suspect left and was gone by the time police arrived.
School officials say Dominguez showed up again at the end of the school day. Police followed the suspect as he tried to leave again. He was later arrested at his home in the area of Abby and Santa Rosa streets.