Ux-Mal was an inhabited planetary system. In the 19th century, hundreds of criminals from Ux-Mal were exiled to a moon of Mab-Bu VI. Their consciousness was separated from their bodies, and left adrift to suffer in the moon's intense electromagnetic storms. When the USS Essex passed by Mab-Bu VI, the criminals attempted to escape by hijacking the crew's bodies, but the effort failed and the Essex crashed.
When the USS Enterprise-D attempted to identify the source of the distress call from Mab-Bu VI, the criminal entities took over the minds of Data, Counselor Deanna Troi, and Chief Miles O'Brien. Claiming to be the spirits of the Essex crew, they initially claimed that they simply wanted to rest, attempting to force the Enterprise crew to help them free their fellow prisoners by using Captain Jean-Luc Picard, Worf, and Keiko O'Brien as hostages, but the attempt failed when Picard had the cargo bay they were using to transport their fellow prisoners up to locked down, threatening to vent the cargo bay and kill everyone inside it to stop the criminals escaping. Knowing that both their hosts and their hostages would be willing to sacrifice themselves to save the ship, the criminals were forced to depart their borrowed bodies, returning to their imprisoned state. (TNG: "Power Play")