Bayat Castle

Bayat Castle (Bayat qalası) is located in Kebirli village of Tartar Rayon of Azerbaijan.

History
After the death of Afshar ruler Nadir Shah, Azerbaijan split into several khanates one of which was the Karabakh Khanate founded by Azerbaijani ruler Panah Ali Khan Javanshir. The first capital of the khanate was the Bayat Castle built in 1748 in Kebirli mahali (province). The name of the Bayat castle was given in honour of the Turkic Bayat clan. The castle included all strategic defense structures such as walls warfare trenches and had a market, bath house and a mosque. It was built with hard burned bricks. When the construction of the castle was finalized Panah Ali Khan moved all of his court to the castle.

Bayat Castle in siege
First official recognition of independent Karabakh Khanate came from Adil Shah in 1748 who recognized Panah Ali as khan by a decree and sent him gold, diamond-decorated sword which reached the Bayat castle by a messenger. However, the actual first recognition of Panah Ali Khan's authority over Karabakh was from the ruler of Shaki Khanate Haji Chalabi Khan in 1748 following his unsuccessful attack of Bayat Castle. The alliance of Shaki-Shirvan khanates and Armenian meliks led by Haji Chelebi sieged the castle for more than a month. Every two-three days, Panah Ali Khan exited the castle with his cavalry and attacked the enemy camp outside of the castle. Suffering heavy losses the allied forces led by Shaki khan retreated back to their regions. Haji Chalabi Khan later wrote: "Panah Ali Khan was an unpolished silver. And we came and forged it and returned. Panah Ali had declared himself a khan, but I acknowledged his rule with my defeat." The courage of Panah Ali Khan during the Battle of Bayat reaffirmed his rule and peacefully subordinated all Karabakh tribes. At the same time, the battle of Bayat disclosed the weaknesses of khanate's defense and soon Panah Ali Khan ordered construction of a new castle at Shahbulag.

The capital was therefore soon moved to the newly constructed Shahbulag Castle located in lowland Karabakh in 1752. Eventually, with an intent to secure the state from external threats, especially from Iran, Panah Ali Khan moved the capital to its final location, Shusha, a more reliable natural fortress located on a hardly penetratable mountain rock.

Current state
Bayat castle is among the most valuable historic and cultural monuments of Azerbaijan. It is one of the monuments that partially survived after more than two centuries. It is mostly in ruins after the Nagorno-Karabakh War.