Several different words were used by the ancient Egyptians to describe places and phenomena that we might translate as some kind of 'harem' (an Arabic word literally meaning 'forbidden' or 'inviolable'). The term ipet nesut was used to denote the 'royal private quarters' or 'royal apartment/granary', while the term kap seems to have been used to refer to a kind of school or nursery within palaces where it is presumed some of the wives and their children were housed.
The Egyptian term khener (deriving from a verb meaning 'to restrain, confine') is often translated as 'harem' (referring both to the place and to its inhabitants), and it is used by Egyptologists to describe an administrative institution connected with royal women and probably attached to pharaonic palaces and villas during the New Kingdom. However, the translation of this term as 'harem' can be confusing both because it was almost certainly not precisely the same as the Ottoman harem (which tends to be the example best-known to western scholars) and because the texts and archaeological remains are comparatively difficult to reconcile.
The surviving texts describe an important economic institution supported from taxation, and receiving regular supplies of rations, and on the other hand the archaeological remains at some royal settlements suggest the domestic apartments of the king and his royal women. These royal harems would have included not only Egyptian women and their children, but also large numbers of foreigners married by the Egyptian king primarily in order to establish diplomatic links with the Hittite and Mitannian royal courts. In Year 34 the Egyptian bonds with the Hittites were strengthened by a marriage between Ramesses and a daughter of Hattusili, who was received with much pomp and circumstance and was given the Egyptian name Neferura-who-beholds-Horus. This event was recorded not only on the 'marriage stele' in Ramesses' temple at Abu Simbel but also on Papyrus UCL 32795 from the likely harem palace at Gurob, which refers to '...the king's wife Maathorneferura (may she live) (the daughter) of the ruler of Khatti'.