The African elephant has the longest gestational period out of all mammals, with an average pregnancy lasting almost 2 years.