It served as an Ottoman headquarters, a prison, an ice factory and a mill before falling into neglect.
Now Najaf's historic and much loved Khan al-Shilan is getting a new lease on life -- as a museum.
Local authorities in Najaf plan to turn the structure into a museum featuring antiquities and archaeological pieces, as well as statues of rebels and some of the actual weapons they used in a 1920 Iraqi uprising against the British, during which captured soldiers were held at Khan al-Shilan.
In addition to its long history, Khan al-Shilan is significant due to the remains of drawings and dates left by the captive British soldiers, which are still visible on its walls.
According to Hassan al-Hakim, a history professor at Kufa University, Khan al-Shilan was originally intended to be a rest house for pilgrims visiting Najaf, which is home to the shrine of Imam Ali, one of the most revered figures in Shiite Islam, and visited by hundreds of thousands of pilgrims each year.
But it was used as an Ottoman military headquarters before the defeat of the empire in World War I, and then as a local government administrative building.
When the British occupied Iraq, they dispatched forces from Baghdad who took control of Najaf, and Khan al-Shilan.
But when Iraqis launched their 1920 uprising, Khan al-Shilan temporarily reverted to local control and was used as a prison to hold British troops captured in several battles.
In 1933, the first electrical generator in the city was installed at Khan al-Shilan, providing power for the old city and the Imam Ali shrine, Hakim said.
Khan al-Shilan was later used as a site to grind wheat, and then as an ice factory, he said. It was rented out in the late 1990s and parts of it were destroyed, while others were used for rubbish disposal.
Khan al-Shilan measures about 1,500 square metres (16,000 square feet) and features three cellars, as well as rooms arrayed around its courtyard. Its walls and entrance are decorated with Islamic designs.
Ahmed Kaabi, a 50-year-old who lives near Khan al-Shilan, said that "our memories are linked to it and we consider this place one of the symbols of Najaf."
The plan "to turn the Khan into a museum is a good project, despite the delay, because this place is very dear to us," Kaabi said.
After more than half a century of neglect, "this building tells a lot of the history of Najaf," said Hamza al-Khalidi, the director of Khan al-Shilan. It is of "major importance with respect to the heritage of Najaf."
Local authorities decided to turn Khan al-Shilan into a museum as part of the city's role as the Arab world's Islamic Capital of Culture for 2012.
But when the problem-plagued culture capital project was scrapped, the Najaf Archaeological and Heritage Directorate took over, and Khan al-Shilan is still slated to become a museum in 2013.
Najaf, the centre of Shiite religious scholarship worldwide, holds archaeological sites dating from a number of different periods.
But like many such sites in Iraq, not all are well cared-for, including the remains of the celebrated ancient Christian city of Hira, which lie neglected and mouldering a stone's throw from the Najaf airport because funds for excavation have dried up.
Khan al-Shilan has also suffered from a lack of attention.
It "was subjected to negligence since the departure of the British occupation until the last two years, in a way that affected the building and general structure," said Mahdi al-Saigh, a member of the Popular Heritage Committee in Najaf.
He called for the "formation of a commission to take care of Najaf's heritage, much of which has been lost."
"We have a complete list of the heritage sites and houses in Najaf and the surrounding areas," and request that the places be cared for, Saigh said.