The writer, whose book Solo is published today, is the latest in a long line of novelists to continue the adventures of the spy first created by Ian Fleming.

Boyd said he had approached the story, which sees 007 embroiled in a civil war in 1969 Africa, as a fan of both the books and films.

“The thing is with the literary Bond, as opposed to the cinematic Bond, is that he’s a very complex character,” he said.

“I mean he is a cool, capable, guy and he’s a very successful operative, but what makes him fascinating for readers is the darker side of him.

“He’s troubled, he makes mistakes, and I think that three-dimensional portrait of him you get in the novels explains why he’s not just some cardboard caricature spy, he’s a real living, breathing, interesting individual.”

Think you know James Bond? Read the Bluffer’s Guide’s FIVE things you didn’t know about 007

Boyd, who has written screenplays for films starring three Bond actors – Sean Connery, Pierce Brosnan and Craig – said he’d had “discussions” with the current 007 about whether he should write the book.

He said: “I knew he was going to say yes.”

The writer, whose novel Restless was adapted for television last year, said it was “highly unlikely” Solo would be made for the cinema.

“It is set in 1969 and the Bond films are always set in the present day,” he said. “They’ll never make a retro Bond. I suppose they can take my plot and update it but then it would be different and because it’s set in the 1960s it gives it a particular flavour.”

Boyd, who has written his personal recipe for the perfect dry martini into the book, added: “If there was to be an actor to play my James Bond, I’d choose another actor who has also been in a film of mine and who I also know and who is also called Daniel – Daniel Day-Lewis – because I think Daniel Day-Lewis actually resembles the Bond that Fleming describes.”

The book was launched on Wednesday at London’s Dorchester Hotel, where seven numbered and signed copies were driven off in vintage Jensen cars like the vehicle Bond drives in the novel.

They were then flown around the globe to destinations including Los Angeles and Cape Town to mark Thursday’s publication.

Boyd follows in the footsteps of authors including Kingsley Amis and Sebastian Faulks who have written new Bond books since Fleming’s death in 1964.

This year marks the 60th anniversary of the publication of Fleming’s first James Bond novel, Casino Royale. Fleming wrote 14 Bond books and the series has sold more than 100 million titles.