When the Ottoman Empire invaded the Kingdom of Morea in the Seventh Ottoman-Venetian War, many Venetians were forced to flee the area quickly. Legend has it that when two Venetian brothers went to Nafplio in 1730 to retrieve gold their father left behind, a sinister Agha murdered them and stole the gold. The Agha later felt guilty and decided to use his blood money to gain redemption by funding the construction of a new mosque.
Later that year, construction began on a mosque in the town square. It was built in the traditional Ottoman architecture of the time, using large blocks of gray stone. The main building was square and capped with a large dome, while on the west side there was an arcade that was capped with a smaller dome. A large terrace on the second floor showcased a view over a large portion of the city and port.
Shortly after the Greeks won their independence from the Ottomans, the building was converted for use as the first Hellenic Parliament and operated as such until the capital was moved to Athens in 1826. From 1828 to 1831, the building served as a public gathering place, hosting meetings and dances. In 1831 a Hellenic school opened upstairs but closed the following year. Also opening in 1831 was a prison in the downstairs areas. The prison ceased operating in 1834, but not before serving as the site for treason trials of several Greek revolutionaries who were charged with conspiring against King Otto, including Generals Theodoros Kolokotronis and Dimitrios Plapoutas.
The building mostly sat idle until suffering earthquake damage in 1928, which caused the smaller dome to collapse. The roof was repaired, but the building was still rarely used until the Greek government rehabilitated it and turned it over to the Ministry of Culture, which currently uses a portion to house the Municipal Art Gallery of Nafplio.