Answer
António Costa was the Minister of Internal Administration before becoming mayor of Lisbon. This is a high-ranking position in the Portuguese government, and it gave Costa experience in dealing with a variety of issues related to internal security and public order. Costa's time as Minister of Internal Administration also gave him a chance to build a political network and develop his public profile.