In 1838, the British decided to install a ruler in Afghanistan so that a buffer state would exist between British India and the potential danger posed by Russia and Persia. Accordingly, the Amir of Kabul was to be Shuja-ai-Mulk who had spent the last 30 years in exile in Ludhiana. An army was recruited for him and one of the regiments of this army was the 3rd Regiment of Infantry, the forbear of the 12th Pioneers.
Shah Shujah was installed and Dost Mohammed, his rival, fled. The 3rd proved themselves to be a useful unit for mountain fighting and were posted to a partially ruined fort called Kelat-i-Ghilzie which lay between Ghunzee and Kandahar. Whilst there, the British were forced to leave Kabul and massacred on their terrible journey to Jellalabad. Shah Shujah was murdered in April 1842 and Ghunzee was captured bringing about the release of Afghan troops and tribesmen. Kelat-i-Ghilzie was besieged for several months. The 600 men of the 3rd along with 250 of the 43rd and about forty British artillerymen, all commanded by Captain Craigie of the 3rd, repulsed the attacks of some 6000 Afghans. Amazingly there were no fatalities amongst the defenders, only 4 men from the 3rd and 2 from the 43rd were wounded.
The 3rd was taken on to the strength of the Bengal Army as an extra regiment with the name of the fort it defended as its own name, for it's heroic efforts, and became, in 1861 the 12th Regiment of Bengal Native Infantry. The title of Khelat-i-Ghilzie was reinstated in 1864.
In 1914 they were stationed at Quetta and comprised 4companies of Jats and 4 of Lobana Sikhs. Their WW1 service was in India and Mesopotamia. By this time, they were styled Pioneers and after the War became the 2nd battalion 2nd Bombay Pioneers stationed at Kirkee. From 1929 to 1933 the Pioneers were merged with the Royal Bombay Sappers and Miners which eventually became part of the Corps of Engineers. Even today the Commandant's House is called Pioneer House and the Bombay Sappers Group Museum is housed in the barrack building that used to be the HQ for the Bombay Pioneers.