The British then captured Accra in 1874 , and in 1877 , at the end of the second Anglo-Asante War , Accra replaced Cape Coast as the capital of the British Gold Coast .
In 1877 , at the end of the second Anglo-Asante War , Accra replaced Cape Coast as the capital of the British Gold Coast colony .