MI5 and MI6

Ok, so British Intelligence at home is called MI5 and abroad is MI6; what does the MI stand for? Why 5 and 6? Are there MI’s 1 through 4, or an MI7?

I just looked it up in my little dic. MI=Military Intelligence, sections 5 and 6. 5 is counterintelligence, 6 is espionage and intelligence.

The various other former divisions of “MI” were recently discussed in the thread What did MI-1 through MI-4 do?