MI5 & MI6 -- What do they mean???

I’m referring, of course, to the British spy agencies of the same name.

I kind of undersand what they do – MI5 is internal intelligence gathering, and MI6 is external. But what exactly do the names mean?? I’m guessing the “MI” means “Military Intelligence”, but what do the numbers represent? Is/was there an MI1 - MI4? Will there ever be an MI7?

MI-5 is formally the Security Service, and reports to the Home Office; MI-6 is formally the Secret Intelligence Service, and reports to the Foreign Office. The now-unofficial “MI” names come from the two services’ antecedents in sections 5 and 6 of British military intelligence.

See the recent thread What did MI-1 through MI-4 do? for a bit more discussion.

I have no idea, but here’s a possibilty. Like military staffs, the intelligence organization might be categorized by function. For examle there is an intelligence department function that involves personnel. That could be MI1. Office supplies and that sort of logistics could be MI2. Analysis of data might be MI3, while gathering of data (spying) could be MI4. And so on.