Tyko and Julia have been caught by the Lord. Just as Tyko and Julia and numerous other young prisoners are waiting to be sent to the Snake-Monkey, half-man, half-gorilla, who demands the Lord to send him 40 young people every year to keep him satisfied, they all manage to escape with the help of Mr. Harakka, Don Ramon and Lillevi. They steal a boat and manage to flee from Son-Li.
After a dangerous journey over the wild sea they get lost and end up in a dome where they meet the Snake-Monkey and hundreds of young people sent to the Snake-Monkey before them. The Snake-Monkey turns out to be friendly. He has been trying to find Tyko for years to help him. With the assistance of the Snake-Monkey, Tyko and his friends find the right gate to the third world The Dark Planet and The City of the Dead where Tyko’s mother is waiting in the Square of Two Brothers.
But The City of Dead is a depressing place and Tyko and his friends begin to lose their strengths and are just about to give up their mission. Luckily the book Tyko received from the Geographs guides them through the city to the square where they finally find Margareta. She is the only spectator at a pantomime performance held in the square. The actor on the stage is the Emperor of the City. High above the square a gold medal, The Gold of Polyhymnia, hangs in the air. To free Margareta and break the curse, the medal needs to be taken. It is Julia who manages to seize the medal and hang it around her neck. The curse is finally broken.
When the group returns to Son-Li they are caught in the Lord’s ambush and Tyko is caught by the Lord’s knights. It is the Snake-Monkey who demands the Lord to surrender. The Lord whips his horses and sets of to his palace to pull the handle to drown the city. Tyko manages to trick the Lord and the Lord ends his own life. The city is free and Tyko can return to his own world. There Tyko, Julia and Margareta still have one mission to complete: to free Tyko’s father, General Ramm. To succeed in this last and most important task they once more need the help of their loyal friends: the magpie, the rat and the toad.
Together as a family and accompanied by their brave friends Tyko, Genaral Ramm and Margareta defeat the Dancing Devil and get the throne back. The toad, the rat and the magpie all return to their own world. Tyko is finally reunited with his family and has met a wonderful friend in Julia.