Due out next spring and set in an alternate 1980s London, the book depicts a man and a woman drawn into a love triangle with a ‘synthetic human’

Ian McEwan’s next novel will see the Booker prize-winning author venture into science fiction, as he unpicks the moral dilemma created when a love triangle forms around a “synthetic human”.

Machines Like Me, set for publication next April, will be set in an alternative version of 1980s London, where Alan Turing has made a breakthrough in artificial intelligence, Britain has lost the Falklands war and Margaret Thatcher is battling Tony Benn for power. The novel centres on Charlie, a man “drifting through life and dodging full-time employment”, who has fallen in love with Miranda, a student with a secret.

When Charlie buys a “synthetic human” called Adam and teams up with Miranda to design Adam’s personality, the couple creates what publisher Jonathan Cape called a “beautiful, strong and clever … near-perfect human”. But when a love triangle forms, the three face a “profound moral dilemma”.

According to the publisher, the novel confronts fundamental questions, from what makes us human to whether a machine can understand the human heart.

Dan Franklin, who acquired the new book, said it was “totally compulsive … in pure storytelling terms … funny, sorrowful and intensely engaging”. A mix of mystery, love story, and “one of the most morally layered books McEwan has written”, Franklin dubbed Machines Like Me is “the crucial novel for our times”.

Machines Like Me is not McEwan’s first venture into speculative fiction. His 1987 novel The Child in Time was set in a near future on the edge of nuclear war, with a neo-Thatcherite government pledging to “to keep order, and to defend the state against its enemies”. His 2001 novel Atonement was originally a science-fiction story set “two or three centuries in the future”, according to an interview McEwan gave to the Harry Ransom Center in Texas after selling his archive there for $2m (£1.5m) in 2014.

“The writer tends to forget rapidly the routes he or she discarded along the way,” he said at the time. “Sometimes the path towards a finished novel takes surprising twists.”

McEwan’s last novel was 2017’s Nutshell, a modern retelling of Hamlet from the perspective of a foetus. His most recent work has been adapting his books for film, having written the screenplays for recent films of The Children Act and On Chesil Beach.