From 24 April 2006 to 6 October 2006 he also served as Swedish Minister of Foreign Affairs in the Social Democratic cabinet of Göran Persson. Following the 2006 Swedish general election when his party lost the election, he announced that he will teach at Uppsala University.