Costa's first role in a Socialist government was as Minister of Parliamentary Affairs under Prime Minister António Guterres between 1997 and 1999.
António Costa resigned all government offices in May 2007 to become his party's candidate for the municipality of Lisbon, Portugal's capital city.