Although there are now no more than a handful of Jews in Iraq, the country was once home to one of the oldest of all diaspora communities—dating back to the Babylonian exile of the 6th century BCE. Annie Greene, in a brief history of this community, describes the period when Jews became part of political life:
Iraq became Ottoman territory in the mid-16th century. During the mid-19th century, the Ottoman empire went through modernizing reforms known as the Tanzimat, [which] provided pathways for Iraqi Jews to participate in the Ottoman government. For example, the delegates to provincial administrative councils were required to reflect local religious diversity. For the province containing the city of Baghdad, [with its large non-Muslim population], there had to be Jewish delegates to the provincial administrative council, as well as Christians and Muslims.
The provincial councils served as good practice to incorporate Jews into the Ottoman governing structure. The first Ottoman parliament in 1877–78 included a Jewish member, Menahim Salih Efendi Daniyal, among the four who were sent from Baghdad. After the Young Turk Revolution in 1908, Sasson Efendi Hasqail was elected to the parliament for Baghdad and was returned to this seat twice more until the dissolution of the empire in 1918. In contrast to the situation for provincial councils, there were no mandatory religious quotas for parliamentary seats. That Menahim Salih Efendi and Sasson Efendi were elected in their respective parliamentary eras speaks to their status as individuals from prominent families and the way elite Jewish men were viewed in Ottoman-Iraqi political society.
The situation had changed radically by 1941, when bloody pogroms broke out throughout the country, ushering in a period of fierce anti-Semitism and persecution of Iraqi Jews.
Read more on Katz Center: https://katz.sas.upenn.edu/blog/what-do-you-know-iraqs-jewish-history