In the 13th Century Guinea-Bissau was part of the Kingdom of Gabu in ancient Mali. During the 15th Century Portugal built forts along the coast and engaged in slave trade with the rulers of the region. Rios de Guine, (as it was called then) was administered by the Portuguese from Cape Verde until 1879 when it became a separate colony. After the abolition of slavery, groundnut cultivation became the mainstay of the economy. At the Berlin Conference in 1885, Portuguese Guinea was formally recognized by the European powers. By the 1950s the Balanta and other coastal peoples joined with Cape Verdean dissidents to form the Partido Africano da Independêndia da Guiné é Cabo Verde (PAIGC) and engaged in an armed struggle against the Portuguese rulers. In September 1974 when the Portuguese army overthrew the Caetano dictatorship in Lisbon, Guinea-Bissau was the first of the five Portuguese African territories to achieve independence. Its first ruler, Pres. Luiz Cabral, was deposed by the military veteran prime minister João Bernardo "Nino" Vieira in 1980 who remained in power until 2000 when he was defeated at the polls by Kumba Ialá. After several refusals to call elections Ialá was toppled in a bloodless coup in September 2003 by Gen. Verissimo Correla Seabra. After caretaker period by interim appointed Pres. Henrique Rosa, a presidential election was held in July 2005. Vieira won the presidential election and returned to power.