"Captain, sensors show nothing out there. Absolutely nothing."
"Sure is a damned ugly nothing."
Nagilum was a non-corporeal immortal being that lived outside the universe and could not be detected by Federation sensors, insomuch as being called by Captain Jean-Luc Picard, "something that both is and is not there." Its intelligence was described as "vast", such as that at first Deanna Troi could not discern it. It had no concept of gender or death, and demonstrated telepathic and telekinetic abilities; it was also able to kill by a mere thought.
In 2365, Nagilum encountered the USS Enterprise-D in the Morgana Quadrant. It trapped the Enterprise within a "hole in space" and proceeded to test the Enterprise crew's reactions to various stimuli. Once Doctor Katherine Pulaski surmised that they were being experimented upon, Nagilum manifested a humanoid face to communicate with the crew.
As an immortal, Nagilum professed interest about the concept of a "limited existence", and killed the Enterprise conn officer Ensign Haskell to observe it. Further intrigued, it decided to thoroughly study this phenomenon, which would have cost the lives of one-third to one-half of the Enterprise crew. Rather than submit to the experiment, Captain Jean-Luc Picard activated the Enterprise's auto-destruct sequence.
As Picard prepared for his death in his ready room, he was confronted by Nagilum's manifestations of Troi, Data, and La Forge, all attempting to convince Picard that his actions were not right. When Picard realized that his officers were acting out of sorts, he told Nagilum that its attempts to dissuade him would not work, causing Nagilum to release the ship from the void, and Picard and Riker to end the autodestruct sequence with seconds to spare.
In a final conversation with Picard, Nagilum revealed that it had learned everything it needed to know. Nagilum judged Humanity as being aggressive and militant, obsessed with defying the inevitable and concluded that "as species, we have no common ground"; though it did agree with Picard that they perhaps shared the trait of curiosity. (TNG: "Where Silence Has Lease")