Terry Pratchett has chosen a story of sex-crazed zombie cows and an Iain Banks-esque coming-of-age novel as the joint winners of his inaugural Anywhere But Here, Anywhen But Now prize.

The £20,000 award for previously unpublished novelists was looking for "stories set on Earth, although it may be an Earth that might have been, or might yet be, one that has gone down a different leg of the famous trousers of time", according to the Discworld author. "The possibilities are literally endless, but remember, it's all on Earth. Maybe the continents will be different and the climate unfamiliar, but the physics will be the same as ours. What goes up must come down, ants are ant-sized because if they were any bigger their legs wouldn't carry them. In short, the story must be theoretically possible on some version of the past, present or future of a planet Earth."

More than 500 writers submitted entries, with Michael Logan and David Logan (no relation) chosen as the joint winners from a shortlist of six "after hours of debate" yesterday evening. Both will receive a publishing contract from Pratchett's publisher Transworld, with the prize money to be split.

"It was a long deliberation and although to some it might seem a cop-out to split a prize, we decided that since the existence of the prize was to find new talent then this was the happiest decision to make," said Pratchett, who judged the prize with Tony Robinson and experts from Transworld and Waterstone's. "[David Logan's] Half Sick of Shadows and [Michael Logan's] Apocalypse Cow both stood out in their different ways and I wish their creators the best of luck in their writing careers."

Half Sick of Shadows is "a darkly atmospheric, richly written coming-of-age novel in the spirit of Iain Banks's The Wasp Factory", said Transworld, while Apocalypse Cow is the story of a group of social misfits thrown together after the government accidentally unleashes an experimental bioweapon, "with peculiar repercussions for Britain's farm animals".

"Ever since I wrote my first short story at the age of eight, it has been my dream to become an author – although the idea for a novel about sex-crazed zombie cows did come a little later," said Michael Logan, who lives in Kenya but was born in Scotland. "The full impact of attaining a lifelong goal has yet to fully sink in. I'm sure it will hit me on the way home, when I will bemuse all around me by performing a victorious knee-slide across the concourse at Gatwick."

David Logan said he felt "very lucky" to win the prize. "I am disappointed for the runners-up. The difference between winning and losing is a hair's breadth," said the writer, who lives in Carrickfergus, Northern Ireland.