The Halfmen of O by Maurice Gee
The World of O is a trilogy of fantasy novels by New Zealand author Maurice Gee published 1982-1985. The Halfmen of O (1982) is the first of the series. We might call this series The New Zealand Chronicles of Narnia with a bit of sci-fi thrown in. There are also tropes recognisable from The Wonderful Wizard of Oz.