Roger Moore, the longest-serving actor to play the iconic British spy James Bond, has died in Switzerland aged 89 after a brief bout with cancer.

His family confirmed on Tuesday via Twitter that "our father, Sir Roger Moore, passed away today".

"We are all devastated," the message said.

Moore acted in a total of seven James Bond films, including The Man With the Golden Gun and The Spy Who Loved Me.

Born in London on October 14, 1927, Moore - the only child of a policeman - studied painting before enrolling in the Royal Academy of Dramatic Art.

James Bond franchise

Moore played a few small roles in theatre and films before his mandatory army duty, then moved to Hollywood in the 1950s.

In 1954, he appeared opposite Elizabeth Taylor in The Last Time I Saw Paris and with Eleanor Parker in Interrupted Melody the following year.

Beginning with Live and Let Die in 1973, Moore would make six more James Bond films: The Man With the Golden Gun, The Spy Who Loved Me, Octopussy, Moonraker, For Your Eyes Only and A View to a Kill over the next 12 years.

And while the Bond of the Ian Fleming novels that the films were based on was generally described as being in his 30s, Moore would stay with the role until he was 57.

He continued to work regularly in films after handing over Bond to Timothy Dalton, but never with the same success.

His post-Bond films included such forgettable efforts as The Quest with Jean-Claude Van Damme and Spice World with the Spice Girls.

UNICEF role

In 1991, Moore became a goodwill ambassador for UNICEF, having been introduced to the role by the late actress Audrey Hepburn.

As Hepburn had, he threw much of his energy into the task.

"I felt small, insignificant and rather ashamed that I had traveled so much making films and ignored what was going on around me," he said in describing how the work had affected him.

Moore received the Dag Hammarskjold Inspiration Award for his work with UNICEF and was named a commander in France's National Order of Arts and Letters in 2008, an award he said was worth "more than an Oscar".

That same year he published an autobiography, My Word Is My Bond, which included details about his work on the Bond films, his friendship with Hepburn, his encounters with Cary Grant, Frank Sinatra, Elizabeth Taylor and other stars, and his health struggles - including a bout with prostate cancer, which he beat.