The concept of the Middle Kingdom as one of three "golden ages" was coined in 1845 by German Egyptologist Baron von Bunsen, and its definition evolved significantly throughout the 19th and 20th centuries. Some scholars also include the Thirteenth Dynasty of Egypt wholly into this period, in which case the Middle Kingdom would end around 1650 BC, while others only include it until Merneferre Ay around 1700 BC, last king of this dynasty to be attested in both Upper and Lower Egypt. During the Middle Kingdom period, Osiris became the most important deity in popular religion. The Middle Kingdom was followed by the Second Intermediate Period of Egypt, another period of division that involved foreign invasions of the country by the Hyksos of West Asia.