Thanos had the Power gem, Lockjaw had the other five. They fought. Lockjaw eventually gained the upper hand and stranded Thanos in another dimension. He then used the gems to create a psychic link between the Pet Avengers, so they'd be together always, and turned over the Infinity Gems to Reed and Black Bolt.