 Mandela was imprisoned by a then predominantly white government of South Africa for a total of 27 years  until the abolition of apartheid in the country.
<clarity>  Mandela was imprisoned by a then predominantly white government of South Africa for a total of 27 years  until the abolition of apartheid in the country.
 Mandela was imprisoned for a total of 27 years until the abolition of apartheid in the country.