The Second Boer War ( 1899 to 1902 ) caused the end of the South African Republic . The Second Boer War ( 1899 to 1902 ) resulted in the end of the Transvaal Republic and start of British hegemony in South Africa .