Fort Willem II, Ungaran

Fort Willem II of Ungaran (known locally as Benteng Ungaran or Benteng Diponegoro) is a late 18th-century fort built by the Dutch in Ungaran, Semarang Regency, Central Java, Indonesia. Its main purpose was to control an important trade route between Semarang and Yogyakarta. The fort is the place where Prince Diponegoro was imprisoned while waiting for his judgment in Batavia and further exile to Makassar. The fort is currently used as a dormitory for the families of Indonesian police personnel.

Description
Fort Willem II is a small square-shaped fort with four bastions, located in the center of Ungaran, on the Semarang-Surakarta road. The building of the Regional People's Representative Assembly (DPRD) is located just in front of the fort. A moat used to surround the fort until the 19th century, when it was filled in. The fort consists of a one meter thick wall around a two-story building which provides a vantage point to the western main entrance and the eastern back entrance. The buildings inside the fort surround an inner courtyard.

History
Fort Willem II is among the Dutch oldest fortress in Java built during colonial era. There are differing opinions regarding the fort's completion. The fort was built by the Dutch in 1786 to maintain peace along a trade route in Central Java as one of the series of Dutch forts which include Fort Herstelling in Salatiga and Fort Veldwachter in Boyolali. The fort was originally named Fort de Ontmoeting ("the meeting") to commemorate the historic meeting between Pakubuwono II, the first Susuhunan (ruler) of Surakarta, and Gustaaf van Imhoff, Governor-General of the Dutch East Indies, on May 11, 1746, at which the transfer of the capital of the Mataram Sultanate from Kartosuro to Surakarta was agreed. Some sources claim that the fort was built in 1712. Others that the fort was constructed between 1740 and 1742 during a chaotic period in Java; with Baron van Imhoff being hospitalized in the fort after an attack by a force from Surakarta in 1742.

Between 1800 and 1807 Fort Willem II was controlled by the Batavian Republic; from 1807 until 1811 French soldiers took over the fort. The British army occupied the fort from 1811 until 1816, when it was handed back to the Dutch.

In 1826, during the Java War, the fort was attacked from the direction of Rembang by troops of Prince Diponegoro, led by Kyai Mojo, Diponegoro's religious advisor and military commander. The fort almost fell to Kyai Mojo after being surrounded for two weeks, but it held out until Kyai Mojo withdrew. When the war ended in 1830, Diponegoro was captured and imprisoned inside Fort Willem II for three days in August 1830 before being transferred to Batavia to be tried.

The British captured the fort without resistance in 1849 and used it as a hospital until it was returned to the Dutch. The Dutch used the fort as a military camp between 1918 and 1919.

During the Japanese occupation, from 1942 to 1945, the fort served as a prison. It was reoccupied by the Dutch in 1945 and used as police barracks until 1950. In 1951, after Indonesian independence, it was briefly used by the Indonesian National Armed Forces and then transferred to the police. In 2007, the Semarang Regency decided to turn the fort into a museum, and in 2011 it was renovated in preparation for the conversion. However, land ownership disputes caused problems and the restoration was cancelled. The fort is currently used as a dormitory for the families of 16 members of the police department.