Andrew G. Bain, an only child whose parents died when he was young, received his schooling in Edinburgh, but no vocational training. He arrived at the Cape in October 1816 and in November 1818 married Maria Elisabeth von Backstrom in Cape Town. They had twelve children, including Thomas C.J. Bain* who followed in his father's footsteps as a road builder. After working for some time as a saddler in Graaff-Reinet Andrew started a life of trading, hunting and exploring. In 1825 he and Benjamin Kift, having obtained a license to trade beyond the Orange River, travelled widely and among others visited Kuruman. In 1826 he and John B. Biddulph undertook an expedition into present Botswana and were the first Europeans to penetrate as far north as present Gabarone. Three years later they set out overland for Natal, and though forced to turn back by hostile locals they managed to return with a load of ivory.
Bain, who was a keen observer, a good writer and draughtsman, and endowed with a keen sense of humour, wrote accounts of events in Graaff-Reinet, and of his travels, for the South African Commercial Advertiser in Cape Town and the Grahamstown Journal, signing them "an intelligent correspondent at Graaff-Reinet". Thus he helped to disseminate knowledge about the interior of the country. In August 1834 he undertook his last hunting trip, starting out with the expedition into the interior led by Dr Andrew Smith*. Leaving the expedition at Philippolis he proceeded towards the Molopo River to procure live animals and skins for American buyers. However, in fleeing from an attack by a Matabele impi he lost his waggon and collections, and after considerable difficulty returned to Graaff-Reinet in December 1834. He then joined the fighting in the Sixth Frontier War of 1834-1835, attaining the rank of Captain. As reward he received a farm near the present town of Alice, but following a change in British policy it was taken away again when the area was returned to the Xhosa in October 1836.
Having acquired some experience of road building near Graaff-Reinet, Bain was appointed as an assistant engineer with the Royal Engineers to superintend the construction of military roads on the frontier. The training that he received in this position, combined with his natural ability, made him into the best South African road engineer of his time.
In 1838 he combined his writing ability and shrewd humour to compose a burlesque, Kaatje Kekkelbek; or, life among the Hottentots, which was performed on stage in Grahamstown in November that year and subsequently published in various newspapers. It was a satire on the philantropy of the missionaries and as one of the earliest works in Afrikaans became very popular.
A reorganisation of the Royal Engineers led to his dismissal in 1845. Fortunately by that time the Cape government had commenced the building of urgently needed passes across the Cape mountains. After a holiday during which he undertook an extensive geological tour on horseback, Bain accepted an appointment as Inspector of Roads under the Superintendent of Works (and Surveyor-General), Lieutenant-Colonel Charles C. Michell*. He started work in October 1845, building Michell's Pass, near Ceres. The pass was opened in December 1848. The remainder of his career was devoted to building and improving passes. An important innovation that he perfected was the stacking of dry stone retaining walls to support the roadway along steep slopes. Some of these walls were still in good condition after 150 years. Having discovered a passage through the mountains between Wellington and the Breerivier Valley, now named Bain's Kloof, he built a long pass through it between 1849 and 1853 - an impressive feat of engineering for which he received public acclaim.
Meanwhile, Bain's interest in rocks and fossils had been aroused in 1837 by reading Charles Lyell's popular and influentual three volume work, Principles of geology (1830-1833). Further reading confirmed his determination to apply geological and palaeontological knowledge in a personal study of the rocks of the Cape - a spirit of enquiry that ruled the rest of his life. In 1838 he and his friend M. Borcherds* found their first pieces of fossil bone near Fort Beaufort. One or two days later Bain made his first important discovery just south of the town - a reptile skull with only two large teeth which he named a bidental and which became famous as Dicynodon - the dominant herbivorous mammal-like reptiles of the Karoo era. Around this time he submitted his first scientific paper, "On the head of an ox found in the alluvial bands of the Modder [River], South Africa", in the form of a letter that was read before the Geological Society of London and recorded in its Proceedings for 1838-1842. This fossil of an extinct buffalo, discovered by Martin Smith*, was later named Bubalus baini by H.G. Seeley*. During the next six years Bain amassed a large collection of fossil reptiles. He exhibited them briefly in Grahamstown in 1844 but finding little support for his work sent them to the Geological Society of London, where their importance was immediately recognised. Extracts from his letter to the society were published in its Transactions (Series 2, Vol. 7, pp. 53-59), and in several other journals, under the title "On the discovery of the fossil remains of bidental and other reptiles in South Africa". Furthermore, he received some grants as a reward for his work, and the collection was studied by the palaeontologist Richard Owen* and later purchased by the British Museum. Owen's descriptions were published in the British Museum's Catalogue of South African fossil reptiles in 1876. The species Pareisaurus baini was named in Bain's honour.
Encouraged by the reception of his finds he continued his fossil hunting and sent further shipments to England. With Dr W.G. Athestone* he studied the Uitenhage Group and its fossils, which were described by D. Sharpe in the Transactions of the Geological Society of London for 1845-1856. His shipments included the first substantial collection of invertebrate remains from the Bokkeveld Group, which were described in the same volume of the Transactions by D. Sharpe and J.W. Salter. He also continued with his compilation of the first geological map of the Cape, which was dispatched, with sections and a memoir, to the Geological Society of London in December 1851. Though necessarily incomplete and based on some inaccurate observations, his work represented an essential and important first step in unravelling the complex succession of geological strata covering a huge area. A succession that occupies a large area in the south-western Cape and which he described as the Clay Slate Series is now known as the Malmesbury Group. He was the first to determine the stratigraphic succession of what came to be known as the Cape Supergroup. He recognised that the rock type now known as Dwyka tillite, which he called the Claystone Porphyry and assumed to be of volcanic origin, extends through the southern Karoo from the Great Fish River westwards and then northwards at least as far north as the Hantam. It struck him that there were no marine fossils in the Karoo rocks; hence he hypothesized that they had been deposited in a great freshwater lake and named them the Lacustrine Formation. Though this view was widely accepted for many years, later research showed that the Karoo environment was deltaic rather than lacustrine. The Geological Society of London, recognising the significance of his work, described it as "the triumphant results of the single-handed labours and unaided research of one who, by his own perseverance and talents alone, has not only worked out so grand a geological problem, but has trained and wholly educated himself for the task". His memoir was published as "On the geology of southern Africa" in the second series of the society's Transactions (Vol. 7, pp. 175-232) for 1845-1856. Some leading geologists in Britain wished to have him appointed as geological surveyor for the Cape, but the colonial government regarded him as too valuable as a road engineer, while Bain himself also preferred to continue in that position as it allowed him sufficient time to conduct his geological investigations. During 1852-1853 he none the less reported to the government on reputed coal deposits near Swellendam and Cape Town. Andrew Wyley* was soon afterwards appointed as the first full-time colonial geologist. By that time Bain had briefly visited the copper district of the Northern Cape and written the first formal geological report dealing with the region, "Account of the geology of Namaqualand", which was included in Parliamentary Report A39-54 (pp. 35-37) of 1854, Correspondence upon the subject of the discovery of metals in Namaqualand....
Though most of his fossils and writings were sent to Britain, he also contributed to local institutions. For example, he was an important provider of animal and plant fossils of all geological ages to the Albany Museum during its early years. In 1855, when the Medico-chirurgical Society (soon renamed the Literary, Scientific and Medical Society) was founded in Grahamstown, it was resolved at the very first meeting "that in consideration of the scientific pursuits and attainments of A.G. Bain, Esq., that gentleman be invited to become a member of the society." Soon thereafter he entertained the members of the society with a paper, "Geology of South Africa: Reminiscences and anecdotes connected with the history of geology in South Africa...", which was published in the Eastern Province Monthly Magazine (1857, Vol. 1, pp. 7-20). Forty years later it was reprinted in the Transactions of the Geological Society of South Africa (1897). Another lecture by him on "Geology of South Africa" also appeared in the Eastern Province Monthly Magazine (1857, Vol. 1, pp. 396-407, 456-465).
The description "Father of South African geology" was first applied to Bain by E.L. Layard* in the annual report of the South African Museum for 1857. This honorary appellation has been confirmed by many others since, including S. Schonland* (1893), E.H.L. Schwarz* (1895), S.H. Haughton* (1964), and W.J. de Klerk (1997). It aptly characterises his pioneering achievements in this field.
Bain was transferred to the Eastern Cape in about 1855, while his son Thomas succeeded him as Inspector of Roads for the Western Cape. Despite the nature of his work he managed to participate actively in public affairs. Thus around 1855-1860 he served on the committee of the Albany Public Library; was a Justice of the Peace in Albany; served on the management committee of the Literary, Scientific and Medical Society of Grahamstown (as vice-president for some years), and lectured on geology under its auspices; was a member of the first executive committee of the Eastern Province Agricultural Association; was a director of Cawood and King's Mining Company; and in 1858 arranged the fossils of the Albany Museum. In 1860 he began his most ambitious project, the Katberg Pass, some 50 km long, over the Winterberg range between Queenstown and Fort Beaufort. He was a powerfully built man with a strong constitution, working hard and under difficult circumstances despite his advanced age. However, in 1863 heart problems forced him to take leave before the work was completed. He went to Britain in April 1864, where he was warmly received by leading geologists and palaeontologists, but returned to South Africa the same year and died in Cape Town.