Investigators said Larry Smith, 28, was held as a suspect in the attack on the girl after she got off a bus at 4:44 p.m. Thursday, the Chicago Tribune reported Friday.
Police said the the girl was thrown to the ground and her pants were being pulled down by her alleged attacker before the other man and his dog appeared.
The man chased the alleged attacker with the dog and they were able to corner him until police arrived, officers said.
Smith was charged with attempted criminal sexual assault. The girl was not seriously injured, police said.