SG-1 rescues the Tollans from the impending destruction of their homeworld. Back at base, said base is thrown into conflict when it turns out the Pentagon wants the Tollans' advanced technology. Kinda hard to keep hold of them when they can walk through walls, though. Things come to a head, Sam gives a Tollan named Narim a cat, and Daniel eventually dials the Nox so Lya can take the Tollans through the Stargate and help them find a new, Stargate-less world.
Somehow, Colonel Maybourne forgets you can't court-martial civilians.