When Qasr Al Hosn was built, more than 200 years ago by Sheikh Shakhbut bin Dhiyab Al Nahyan, its main purpose was for defence as well as a place where everyday problems were solved and decisions made.
Inevitably that included a prison, so that the people might witness not only the decision-making process but also the pursuit of justice and the consequences of wrongdoing.
The eight rulers who succeeded Sheikh Shakhbut bin Dhiyab preserved the role of the palace so that it continued in its role as courthouse. The locals looked to the palace to solve their problems.
Certain procedures had to be followed before the rulers issued their verdicts. Those seeking justice would go to the ruler's majlis in the palace and present their case. If the issue was clear and simple, the verdict would be issued right away.
In more complicated cases, the ruler would send people he trusted to investigate further. In other cases, the issues were too complex - for example, those involving inheritance law, requiring the knowledge of an Islamic scholar. In these instances, the ruler referred cases to the local judge.
During the reign of Sheikh Shakhbut bin Sultan Al Nahyan, Qasr Al Hosn was extended, and with it, a shift in its purpose. The palace became the home of the ruler and his family. At the same time a modern judicial system was developed, under British supervision.
Justice became more standardised, but the palace continued to play an important role in helping local people with their daily problems, with a shift in protocol as court affairs became more formal.
People were asked for their full names before entering the palace gates and being directed to the ruler's majlis. Men would present their issue to the ruler; women would present their issues to Sheikha Salama (the mother of Sheikh Shakhbut). And eventually those convicted would serve their sentence outside the palace's walls.
One of those who spent time in the palace's prison was the famous poet Ahmed Al Kindi, who worked for British Petroleum. After a car crash resulting in the death of another man, he was given a modern trial and sentenced to prison.
Al Kindi felt that the walls of the palace needed to hear how he felt. After a few days, he decided to write a poem showing his remorse and repentance to Sheikh Shakhbut. The poem explained why he was in prison and that he had accepted his sentence.
However, he also explained how his family had been left with no financial support while he served his sentence and also that he was the only child of an elderly woman. Here is the poem translated from Arabic:
"Oh Sheikh Shakhbut grasp my saying
Of words, on my shaken condition
A treacherous night left me overturning
Unable to turn what God has written
Under the shade away from the sun
I return my request to your seeing
Where no just inquiry has ever fallen."
Al Kindi sent the poem to the palace hoping that his dilemma would be solved. Sheikh Shakhbut ordered his release and had him brought to Qasr Al Hosn so the walls would once again stand a witness to a convicted man.
Faraj Ali Bin Hamoodah, a member of the first National Consultative Council and one of Sheikh Zayed's trusted men, casts more light on the palace's role in handing down justice.
"Sheikhs would only put people in prison if they felt there was no alternative. It was intended to be a slap on the wrist rather than a serious punishment," he says.
"The sheikhs would try to persuade the victims of the crime to forgive the prisoner so that he could be set free. That idea of forgiveness is still basic to the way sheikhs solve problems today.
Al Hosn was also the place where legal matters were dealt with between tribes. The sheikh would allocate a representative of his own to deal matters on his behalf. This was the case before Sheikh Zayed the First. At that time people tried to solve their own problems and if they were unable to do so they would go to the elder of the district. This person would be wise and experienced in tribal law and traditions. All these laws were preserved through oral tradition, and laws that were not recorded but known by inheritance and experience.
"This person was called a muhakam, a sort of judge, but only in tribal law and tradition with an Islamic reference. He would be fair and just and not favour any man above the other.
"In a situation where someone would have a problem, they would go to him and speak in front of other men of such character. You would say your problem, then it would be repeated back to you to clarify everyone heard you correctly. Then they would make a decision.
"Once a decision is made you must obey, otherwise you would lose respect from the other tribes, and respect and reputation was everything at that time, similar to now. The laws given would never be contradictory to Islamic law."
He adds: "In the old days people took responsibility for their own issues. It would only reach the sheikh if the problem could not be resolved.
"But it was encouraged that you forgave and moved forward in life so that the people between themselves would be their own peacemakers. And for this you get rewarded from Allah.
"Al Hosn was an icon of leadership and a symbol of the Al Nahyan family. Someone who sees Al Hosn knows this was a place of justice and gave us a sense of belonging."