1001 Nights in Andromeda: Part One
the 999 crash lands on planet Ali-baba run by a woman named Ali Baba. Tetsuro and Maetel are stripped and taken hostage by her. Maetel tells her a totally bogus story she stole out of a book she read and they manage to get their things back. But then Ali Baba decides to reneg on the deal and tries to recapture Maetel. Tetsuro is attacked by a gigantic roc bird.
Aired 15/01/1981EP 103 - 1001 Nights in Andromeda: Part One

Galaxy Express 999
After witnessing the death of his mother and being left for dead at the hands of Count Mecha, ten-year old Tetsuro Hoshino is awakened by a mysterious woman, Maetal. In exchange for only his company, Maetal offers him the ride of his life on the Galaxy Express 999. It is said that those who travel aboard the legendary train to the end of the line can receive a free mechanical body and with it, immortality.
Impoverished and alone, Tetsuro leaps at the opportunity and joins Maetal on a quest that will span the cosmos. As the Galaxy Express 999 makes its way across our solar system and beyond, Tetsuro is drawn deeper into a dangerous universe where peril lurks at every stop.
(Source: Discotek)