LONDON (Reuters) - Foreign Secretary Boris Johnson has ventured into the headquarters of the MI6 foreign intelligence service for the first time, praising Britain's spies for stealing secrets in an increasingly unpredictable world.

A former journalist and mayor of London known for often outlandish comments and comical behavior, Johnson gained oversight of the spy service upon his appointment as foreign secretary in July.

In a rare statement issued on Tuesday, MI6 said Johnson had paid his first visit to the agency's headquarters at Vauxhall Cross, by the River Thames in London, on Oct. 20. It did not make clear why he had not visited sooner.

MI6 Chief Alex Younger hosted Johnson, who discussed threats ranging from terrorism to the spread of nuclear weapons and cyber attacks. He also addressed MI6 staff and had an informal question and answer session with spies, according to the statement.

"Whether it's combating terrorism or keeping our nation one step ahead of our adversaries, the brave men and women who work for MI6 do a great job in gathering the crucial intelligence the government needs," Johnson was quoted as saying by MI6.

"In an increasingly unpredictable world MI6 is as important now as it's ever been and I am immensely proud of them," said Johnson.

MI6, depicted by novelists as the employer of 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.

"I was able to explain that MI6 is growing and looking to recruit the talent it needs to counter the evolving threats to national security," said Younger, who as chief of MI6 is one of the West's most powerful spies.

Prime Minister Theresa May's appointment of Johnson, who in the run-up to Britain's referendum on EU membership compared the goals of the European Union to those of Adolf Hitler and Napoleon, caused consternation in European capitals.

Johnson, who was born in New York, originally made his name as an EU-bashing journalist in Brussels, then entered politics, serving as a Conservative lawmaker and then as mayor of London from 2008 to 2016.

He was the leading voice in the campaign for Britain to leave the EU, but caused hilarity last week by vowing that Brexit would be a "titanic success". He corrected that to a "colossal success" after becoming aware that his remark had conjured up the 1912 sinking of the Titanic cruise liner.

(Reporting by Guy Faulconbridge, editing by Estelle Shirbon)