Before Sultan Abu Bakar became the ruler of Johor, Johor was ruled by Temenggong Daeng Ibrahim who was more favored than Sultan Ali. As a compromise, Sultan Ali was granted a fiefdom over Muar region, while Temenggong Ibrahim ruled the rest of Johor. The war was triggered when Sultan Ali crowned his 11-year-old son named Tengku Mahmood as his successor, resulting in Tengku Alam's fury and envy. He also felt unsatisfied when Colonel Archibald Anson, then acting British colonial governor of the Straits Settlements, recognised the fiefdom of Muar as having returned to Maharaja Abu Bakar's central administration in Johor Bahru. He began his moves by asking his cousins Tengku Nong and Tengku Mat to spread false information to the residents of Muar district to be on his side. He also gathered some powerful warriors for the battle.
Conflict
Tengku Alam and his followers launched the first blow of the war by seizing Jementah town, just outside Segamat, on 25 October 1879. The headman or governor of Jementah reported to the ruler of Johor, Maharaja Abu Bakar, who responded by sending a powerful force led by his cousin, Ungku Ahmad. Ungku Ahmad was a great tactician who contributed to the Johor Government's rapid victory. Dato' Mohammed Salleh bin Perang, also known as Dato' Bentara Luar, was deployed by the government on 2 December to assist the government army. As a strategy, he split the Johor government army into four units to fight enemies easier. Each unit contained about 100 men. By mid-December, the government army conquered more enemy strongholds and finally gained total victory at dawn on 30 December after a surprise attack on the enemy's final redoubt. Since then, the original District of Muar, which then included Segamat, was reintegrated into Johor.
The most notable event that happened as a result of the Johor government's victory in the Jementah Civil War was the opening of Muar as a new modern town by the Maharaja Abu Bakar, where the town was conferred the Bandar Maharani new title. Besides this event, the soldiers from both sides who later resided in the areas of Jementah and Segamat opened the residencies of Pagoh, as well as some villages there.