You will be given a definition of a task first, then some input of the task.
In this task, you are given a question and a context passage. You have to answer the question based on the given passage.

How many years did Iran fight the Turks?, Context: From the early 16th century, both Western Armenia and Eastern Armenia fell under Iranian Safavid rule. Owing to the century long Turco-Iranian geo-political rivalry that would last in Western Asia, significant parts of the region were frequently fought over between the two rivalling empires. From the mid 16th century with the Peace of Amasya, and decisively from the first half of the 17th century with the Treaty of Zuhab until the first half of the 19th century, Eastern Armenia was ruled by the successive Iranian Safavid, Afsharid and Qajar empires, while Western Armenia remained under Ottoman rule. In the late 1820s, the parts of historic Armenia under Iranian control centering on Yerevan and Lake Sevan (all of Eastern Armenia) were incorporated into the Russian Empire following Iran's forced ceding of the territories after its loss in the Russo-Persian War (1826-1828) and the outcoming Treaty of Turkmenchay. Western Armenia however, remained in Ottoman hands.
Output:
century