LONDON, March 24 (Reuters) - The man who killed four people near Britain's Houses of Parliament on Wednesday had spent time working in Saudi Arabia but did not have a criminal record there or attract the attention of the security services, the Saudi embassy in London said on Friday.

Khalid Masood had been in the kingdom for two one-year periods, from November 2005 and April 2008, when he worked as an English teacher, and also visited briefly in March 2015.

"During his time in Saudi Arabia, Khalid Masood did not appear on the security services' radar and does not have a criminal record in the Kingdom of Saudi Arabia," the embassy said in a statement on its Twitter account.

It said King Salman had spoken to Prime Minister Theresa May to express his condolences over Wednesday's attack, adding: "At such a time, our ongoing security cooperation is most crucial to the defeat of terrorism and the saving of innocent lives."

(Reporting by Mark Trevelyan; Editing by Alison Williams) ((mark.trevelyan@thomsonreuters.com; +5521994645262; Reuters Messaging: mark.trevelyan.thomsonreuters@reuters.net))