Tanis was a city, located in northern or lower part of Egypt at the north east of the delta, capital of Egypt during the twenty-first and twenty-second dynasties but do to inundations threatening had to be abandoned.
Much of the stones that came to this place were from Per Ramesses or Pi-Ramesses capital of the delta founded as capital of Lower Egypt by Ramses the II the great constructor; this is also the city from where ruled some of the descendants of Ramses III dynasty.
Tanis came to power at the time that Thebes was ruled by the its High priests, the last pharaoh of the twentieth Ramses XI, was too week to control them.
The Nubian garrisons that were call for help took advantage of the situation and a civil war broke that brought the besiege of Medinet Habu, they broke to pieced the main entrance, it was a time of great disorder in Egypt it was not only the end of the twentieth but also the end of the glorious Egyptian dynasties.
At this time Egypt enters to the third intermediate period and Egypt was divided into small kingdoms Smendes raised from a powerful non-royal family nevertheless his wife Tentamun, probably had royal nexus. Anyway, he proclaimed its independence in the delta and founded the twenty-first dynasty.
The jewelry and sarcophagus found in the area belonging to the Tanis dynasties show that they had a solid economic status that rivals any other place in Egypt at that time.
The principal triad consecrated to the temples of this city was Amon-Ra, Mut and their son Khonsu, the same triad as Thebes and probably Smendes have been a powerful governor and was related to the wife of the High priest of Thebes and even so that some sources mentions him as the Egyptian Pharaoh they did not made a good stronghold to reunify Egypt again.
It is not certain if he ruled the entire Egypt but is very clearly a sure that he ruled the delta and was very powerful economically
On the other hand during this period half of Egypt was divided and the south or Upper Egypt was under a strong hereditary theocracy.
Eventually the whole Egypt went into a great disorder and was disjointed in small local kingdoms of not much importance, torn into rivalry among them and the usurpation of tombs was a common thing, the gods have fallen to the ground.