World Without End

by Joe Haldeman

Captain Kirk and a landing party of four have gone aboard an alien starship/planetoid. They are in prison, awaiting questioning.

Commander Spock is in command, but is unable to do much. Mysterious tentacles have ensnared the ship, draining power. Spock finds himself with few options, remaining on board and eventually crashing to the planetoid surface or beaming inside to join the Captain.