He held this post for ten years , until he was elected President of the United Republic of Tanzania in December 2005 , .
Becoming the country 's longest serving foreign minister .
He held this post for ten years , until he was elected President of the United Republic of Tanzania in December 2005 , hence becoming the country 's longest serving foreign minister .