Image caption Mrs May said Sir Jonathan's "tireless work" had ensured a safe Olympic Games last year

The head of MI5, Sir Jonathan Evans, is to step down from the post next month, Home Secretary Theresa May has said.

In the Commons, Mrs May paid tribute to Sir Jonathan's 33 years with the security service.

He succeeded Lady Manningham-Buller to become director general of MI5 in April 2007, and will leave at the end of his contract.

"I thank him for his invaluable contribution to public safety and national security," Mrs May said.

Speaking at Home Office questions, Mrs May said his work had included investigating counter espionage, developing and implementing key policies on security and most-recently countering the threat of international terrorism.

Analysis Running MI5 is a job which could give you sleepless nights. There's the threat of terrorism - not long before Jonathan Evans took over, Britain had been hit with the 7 July attacks and MI5 faced questions of whether it could have prevented them. And it is not just the al-Qaeda threat - the threat from Northern Ireland's security situation has risen up the agenda. There are also the issues that came out of the post-9/11 years, such as allegations of security service complicity in mistreatment of former detainees like Binyam Mohammed. And most recently there were the Olympics to worry about. Jonathan Evans will be able to depart breathing a sigh of relief that he took MI5 through without any major disasters. New issues are there for his successor though, including how to deal with the growing threat of cyber espionage against Britain and how to manage in a new environment amid possibly questions about funding and priorities.

"He has experienced the service evolving over the years and as director general has led the service through particularly challenging times of change and unrest, including the aftermath of the 7/7 bombings," she said.

"His tireless work helped ensure the delivery of a safe and successful Olympic and Paralympic Games last year."

Terror threat outlined

Shadow home secretary Yvette Cooper said: "We also give thanks for the work Sir Jonathan Evans has done over many years for the security of this country."

At MI5, Sir Jonathan, who is in his mid-50s, initially focused on Irish-related terrorism in the 1980s and 1990s, before moving on to international counter-terrorism investigations in 1999.

He was appointed director of international counter-terrorism just 10 days before the 9/11 attacks on the World Trade Center and the Pentagon in 2001.

Last year, in a rare public speech just a month before the Olympic Games began in London, he said Britain had experienced a "credible terrorist attack plot about once a year since 9/11".

He warned: "In back rooms and in cars and on the streets of this country, there is no shortage of individuals talking about wanting to mount terrorist attacks here."

He was appointed Knight Commander of the Order of the Bath (KCB) in the 2013 New Year's Honours List.