Encounter at Farpoint, Part II
Picard convinces Q that the upcoming mission at Farpoint will be the perfect opportunity to prove his point. Q accepts Captain Picard's proposal but gives him only 24 hours and a reminder that failing this test will mean death for the Enterprise crew.
While docked at Farpoint, Picard is introduced to his new first officer, Commander Riker, and the rest of his crew. As they begin to investigate the station, they are startled by the seemingly magical qualities of the planet where one's wish becomes reality.
While the away team searches through tunnels beneath the Farpoint station, an unidentified ship begins firing on the old Bandi city, causing heavy damage and numerous casualties. As it turns out, the ship is a living alien being who is attacking the city because the people of Deneb IV have captured its mate.
Not only have the Bandi been holding the being against its will, but they have used its energy source, which converts energy into matter, to create the Farpoint station and its magical qualities.
After assisting the reunion of the estranged aliens, the crew learns that it has passed Q's test. Relieved, they head off for their next mission.