How did the ancient Egyptians solve disputes? How did they deal with crime?
I realize I'm asking about an incredibly long period of time and there might have been considerable changes over the course of 3000 years, but feel free to focus on any particular era that might be of interest.
Most of the time people use Ancient Egypt that way :D
However, Egypt did indeed keep a lot of its' institutions very similar throughout much of its' native dynasties. But, for clarity's sake, let's stick with the New Kingdom period. Save for perhaps the Ptolemaic period, this is arguably the time that most people think of when they envision "Ancient Egypt". It's a time of greater bureaucracy and written testimony.
Why don't we start from the top?
Because this part is largely intuitive, and it has more to do with the structure of government than anything, I'll try to be brief. The King was the ultimate expression of Law. The Egyptians held that the King was responsible for maintaining ma'at, or justice, order, etc. This charge meant that the King was at the top of the law. However, it must be said that the amount that a King personally got mixed up in judicial matters had to have been determined by the personality of the said king. Thutmose III stated that he "laid down the correct laws". Amenhotep III said he was "one who established laws" and that he "expelled falsehood from every land". Officially, the King was responsible for that maintaining of order at a fundamental level. Perhaps, we can say according to today's standards, religious level. King's could make Royal Decrees that could be edicts towards things such as temple construction or endowments. These decrees followed a conventional composition.
First, they Horus name of the King was given in a vertical column, followed by the name and titles of the recipient in a horizontal line at the top.
Second, the content of the decree in vertical columns next to the King's name. This would form the main body of the text and would end in the statement: "sealed in the presence of the King himself" and the date of the decree. Now this decree could inscribed on a stele at Karnak, Abydos, and other public places for all to see. Even though they likely couldn't read it.
The original could be stored in an archive, and perhaps even mass-produced in papyrus form.
We have some surviving accounts of King's getting involved in judicial affairs. One from Deir-El-Medina in the 19th Dynasty, recorded on Hieratic Ostracon British Museum 5631, tells of an official that demanded that a writer from the village return copper tools that belonged to Pharoah. When the writer refused, the official seized 12 servants from the writer's household. When the writer's father appealed to Pharoah, he caused that the writer and his servants were set free.
Finally, under the King's authority, special cases could be heard by a tribunal of officials that he chose. For instance, Ramesses III of the appointed a tribunal to deal with the Harem Conspiracy. Now in all fairness, Ramesses could've been dead as a door nail when he did so! However, if he was dead, then it was still a plausible legal fiction to those that would read the account. We read in Turin Judicial Papyrus:
"I commissioned....(Here he lists a total of 12 different officials including the overseers of the treasury Montemtowe and Pefrowe, the King's adjutant Penernute, and others.) saying: 'As for the matters which the people have plotted, go and examine them.' And they examined them and caused them to die. But I had charged them strictly, saying: 'Take heed, have a care lest you allow that somebody be punished wrongfully by an official who is not over him.' "
So the King was the ultimate letter of the law and could create laws and prosecute them in turn. However, he actually deferred the majority of the job to the Vizierate and the 2 Great knb.t courts. These courts, as well as their Local variants, are supposedly a creation of the King's, according to The Decree of Horemheb.
(Sources: Ancient Egyptian Economy- Brian Muhs, Jurisdiction in the Workmen's Community of Deir El Medina- A.G. McDowell, The Pharoah: Life at Court and on Campaign- Garry Shaw.)
After all of this talk of Pharoah, let's take a look at the real brains of the operation.
"A petitioner wants his plea considered Rather than have his case adjudged." -Instruction of Ptahhotep
With that literary quote, and plenty of other admonitions, the Vizier Rekhmire was sworn into service. One other notable passage from Rekhimre's tomb says "He who does justice before all people, he is the Vizier." We could liken the Vizierate to something of Prime Minister. He was the chief judge of the land and the King's representative. Focusing on the high bureaucracy period of Rekhmire mentioned above, we find that there are 2 Viziers. 1 for the North and 1 for the South. At the end of the reign of the late Ramesses III (mentioned above), the Vizierate was consolidated into 1 office based in Thebes.
All of the officials were subject to justice by the Vizier. Disputes regarding the high offices of Mayor and Estate Ruler (the men responsible for the economies of Egypt's 42 Nomes.) came before him, while most disputes outside of the Royal House were only reported to him. The southern Vizier was also responsible for the Workmen's village in the Valley. The Deir-El-Medina referred to earlier. Petitions regarding land found their way to the Vizier, and he was responsible for sealing every imyt-per(Transfer Deed) himself.
Besides being Judge, he was also the supervisor for the police. He would appoint a chief of police and received a report on the security of the country regularly.
He also interacted with the Great Prison, such that archives of hearings by the Vizier were registered there in case an official committed a 2nd offense.
Viziers could investigate cases with the assistance of "Scribes of the Vizier."
They apparently could decide cases on their own, based on the evidence found in the fragments of Hieratic Papyrus Geneve D409 + Turin 2021 from the late 20th Dynasty.
Alternatively, the Vizier and his subordinate scribes could investigate and decide cases alongside the 2 Great knb.t-courts, on which they sat over and presided.
These, like the Viziers, would've been associated with the great cities of Upper and Lower Egypt. So one at Thebes and one at Heliopolis or Memphis.
Of primary concerns to these courts, and the officials presiding over them, were matters of state such as tomb robberies, and abuse of authority.
They did occasionally adjudicate over private property disputes, and as witnesses to transactions. In the Geneve D409 + Turin 2021 Papyrus mentioned earlier, the Vizier persuades some heirs to accept the will of their father, and orders that that decision be made known in the Great knb.t-Court of Thebes. The Vizier was the chief executive of the state, and he was the one personally responsible for handling matters of the law that dealt with the state. The punishment for one found guilty by of such things as tomb robbery was death! And thus, people that wanted to condemn their enemies could accuse them of this such as in the Great Tomb Robbery of the Abbot Papyrus.
(Sources: Ancient Egyptian Literature: the New Kingdom- Miriam Lichtheim, Village Life in Ancient Egypt- A.G. McDowell, Ancient Egyptian Economy- Brian Muhs, Thutmose III: a New Biography Edited by Eric Cline and David O'Connor)