While en route to aid victims of a sudden explosion at a mining colony, the Enterprise is again seized by Q's force-field. Q appears and offers the crew the "realization of impossible dreams." Q seems particularly drawn to Riker.

Picard first tries to delay Q until after their emergency mission is over, then rails against him for repeatedly seizing his vessel. When Riker says, "We don't have time for these games," Q replies, "Did someone say games?" and transports the entire bridge crew save Picard to an unknown, desolate planet. Picard is trapped on his bridge, with no way to communicate outside it, and no controls work.

Q sits down with Riker in the garb of a French marshal, and discusses the rules of the game. Its point is "can any of you stay alive?", and is completely unfair, by Q's own boast. When Tasha objects, Q sends her back to the bridge, which is serving as a penalty box. He vanished from the planet and talks to Picard, where he reveals that the game's true purpose is to test whether Riker is worthy of the gift the Q are preparing to offer him.

As vicious, animal-like soldiers appear and begin to close in on the crew, Q takes Data's place and informs Riker that he's been given the power of Q. Q urges him to use it to send his crewmates back; Riker does. He then talks to Q, who explains that humanity has the capability of growth, an ability the Q lack. It interests them, and they want Riker to join the Q, so they can study it. Riker initially refuses, at which point Q vanishes and puts the crew back on the planet, with the soldiers. Wesley and Worf are mortally wounded, angering Riker to the extent that he puts a force-field around the soldiers and sends everyone back to the Enterprise.

Talking to Picard later, Riker pledges not to use the power, agreeing that the temptation to keep it might prove too great. Unfortunately, upon arriving at the mining disaster, Riker finds a dead, bloodied child, and immediately regrets his promise. He returns to the ship and demands a conference with the bridge staff.

At the conference, Q appears and accuses Picard of jealousy. Riker tries to give his crewmates gifts: he gives Geordi back his sight, makes Wesley an adult, gives Worf a female Klingon, and offers to turn Data human. All refuse, not liking whom they'd have to thank for it. Riker refuses the gift, and Q is dragged back to the Q- continuum by his fellow Q.