When the Fellowship entered the Mines of Moria, they were noticed by the creature Gollum, who had become a slave to the Ring. He had felt the Ring near, and realizing that it was in Frodo's possession, he followed them, bidding his time till he could sneak in and retrieve it.