He wrote the script for the Doctor Who serial Kinda in 1982. This script drew heavily on his own Buddhist faith and incorporated classic Buddhist terms such as dukkha, panna, karuna, devaloka and Mara indeed, "the Mara" was the name of the villain of the piece.
The strength of his script led to Bailey writing a second story for Doctor Who in 1983. This serial, Snakedance, was a sequel to Kinda. New script editor Eric Saward requested that Bailey devise another story idea, but neither the submitted outline for May Time (later renamed Manwatch) for the show's twenty first season, nor the revised version of the submission for the twenty second, retitled The Children of Seth, were taken further. As a result, the two Mara scripts were Bailey's final broadcast work for both Doctor Who and television in general and he returned to a career in academia. The Children of Seth has since been adapted for audio by Big Finish.
Biography from the Wikipedia article, licensed under CC-BY-SA