Global climate change around 3-4 Myr ago is thought to have influenced the evolution of hominids, via the aridification of Africa, and may have been the precursor to Pleistocene glaciation about 2.75 Myr ago. Most explanations of these climatic events involve changes in circulation of the North Atlantic Ocean due to the closing of the Isthmus of Panama. Here we suggest, instead, that closure of the Indonesian seaway 3-4 Myr ago could be responsible for these climate changes, in particular the aridification of Africa. We use simple theory and results from an ocean circulation model to show that the northward displacement of New Guinea, about 5 Myr ago, may have switched the source of flow through Indonesia-from warm South Pacific to relatively cold North Pacific waters. This would have decreased sea surface temperatures in the Indian Ocean, leading to reduced rainfall over eastern Africa. We further suggest that the changes in the equatorial Pacific may have reduced atmospheric heat transport from the tropics to higher latitudes, stimulating global cooling and the eventual growth of ice sheets.