* Spymaster resisted calls to roll back secrecy
* Modernised Britain's foreign intelligence service
* Britain said he is stepping down after five years (Recasts, updates with Foreign Office statement)
By Guy Faulconbridge and Andrew Osborn
LONDON, June 26 Britain's foreign spymaster, who at times quoted Machiavelli and fought off demands to ease secrecy around his MI6 intelligence agency, will step down in November after five years, the Foreign Office said on Thursday.
John Sawers, an ex-career diplomat, became the first outsider to head the Secret Intelligence Service (SIS) in 41 years when he took over in November 2009 under then-prime minister Gordon Brown.
MI6, cast by novelists as the employer of some of the most memorable fictional spies from John le Carré's George Smiley to Ian Fleming's James Bond, operates overseas and is tasked with defending Britain and its interests.
"He has done an exceptional job," the Foreign Office said of Sawers in a statement. "Sir John has spent 36 years in a range of jobs in public service, defending UK national interests and keeping our country safe."
Sawers, who argued that al Qaeda and its affiliates posed the biggest threat to Britain, is believed to have wanted to relinquish his sensitive role before a national election next year. MI6 chiefs normally serve about five years.
Sawer's is the only name in the SIS that is not secret.
His five-year watch coincided with a busy period in world affairs including the Arab Spring revolutions, the Syrian civil war, the spread of Islamist militancy in Africa and Russia's annexation of Crimea.
But one of his toughest battles was at home: Sawers strongly resisted attempts by some politicians and journalists to lift some of the secrecy surrounding MI6, whose existence Britain only publicly admitted in 1994.
"Secrecy is not a dirty word. Secrecy is not there as a cover-up. Secrecy plays a crucial part in keeping Britain safe and secure," Sawers said in 2010 when he gave the first ever public speech by a serving MI6 chief.
Charlie Edwards, an expert at the Royal United Services Institute in London, said Sawers was one of Britain's most experienced and influential security professionals and that his departure was "a big loss".
"His most important legacy I think was that he modernised the service, getting SIS much more tech-savvy in an effort to respond to current and future threats," Edwards told Reuters.
"And crucially, given the current threat picture overseas, he was a genuine believer in joint working with the other agencies. That collaboration paid huge dividends."
When documents leaked by former U.S. intelligence contractor Edward Snowden exposed the scale of Britain's spying, Sawers warned that journalists were not well placed to handle such secrets that he said had been lapped up by al Qaeda.
He and his colleague, MI5 director Andrew Parker, used their first ever joint public appearance last year to argue that the disclosures had damaged British national security.
"They've put our operations at risk," said Sawers, who served as Britain's ambassador to the United Nations until his appointment as MI6 chief.
"It's clear that our adversaries are rubbing their hands with glee, al Qaeda is lapping it up ... and our own security has suffered as a consequence," said Sawers, who also served as foreign policy adviser to ex-prime minister Tony Blair.
Civil liberties groups, parts of the media and some lawmakers have argued that Snowden's disclosures show the spy agencies need more scrutiny and oversight.
Sawers, 58, also had to deal with allegations of torture against MI6 relating to events before his tenure as MI6 chief.
"Torture is illegal and abhorrent under any circumstances and we have nothing whatsoever to do with it," Sawers, who served as a diplomat in Yemen, Syria, Egypt, the United States and Iraq, said in 2010.
When questioned about the failure of the Western intelligence services to predict the 1991 collapse of the Soviet Union, the Sept. 11 attacks or the Arab Spring, Sawers hit back:
"We are not crystal ball gazers. We acquire the secrets that other countries don't want us to know or other organisations don't want us to know; we are not all, all-knowing specialists in what is going to happen next month or next year." (Editing by Mark Heinrich)