Jeanette Winterson, the openly lesbian author, has written a one-off children’s programme for BBC1.

The writer published Oranges Are Not The Only Fruit, a story about a lesbian teenager coming of age, in 1985. It was adapted for the BBC five years later.

The latest programme, a one-off thriller, is titled Ingenious. It tells the story of an 11-year-old girl who lives on a farm with her grandmother and her friends.

In the plot, the friends find a mysterious glass bottle which leads them on an adventure.

Winterson is also planning to publish a children’s picture book, titled The Lion, The Unicorn And Me, to be out in time for Christmas and a longer book for older children.

Writing on her blog, she wrote that the breakup of her relationship with her long-term partner led her to write the picture book story.

She wrote: “When I got back to a freezing home – and no milk in the fridge, and no one there, and I had so hoped there would be someone there – I couldn’t even face lighting the fire or cooking, so I put on my old tweed coat, ate cold baked beans with a spoon from the tin, and started the Xmas story.

“I stayed up most of the night writing the story, and in the morning, when it got light, I felt very much better. It was one of those acts of grace, a thing that comes like a gift, and makes you feel you are not alone, not worthless, not lost.”