Mumbai is made up of 7 islands, and was separated from main land due to Mahim creek. This was an important trade route, and the Mahim fort was built to safeguard it. Mahim fort is the most ancient fort in Mumbai region.
In 1140, King Pratapbimb built a fort on Mahakavati aka Mahim creek, and made this as his capital. He encouraged trade and commerce here in 12th century.
When the fort came under British control, Gerald Aungier reconstructed this fort. When the Portuguese attacked this fort in 1672, they could not win as there were 100 soldiers and 30 canons on the fort.
On 14th February 1689 Siddhi Yakut Khan of Janjira attacked Mumbai with an army of 2500, and captured the fort. He raided this region for around a year. The British took it back later.