for the Covilhã City Council, and has been elected a member of the Portuguese Parliament since 1987, representing the Castelo Branco electoral district. While serving as the chairperson of the Castelo Branco Federation of the Socialist Party (1983–1996), he was elected to the Party's National Secretariat in 1991. José Sócrates was ousted by the Board of the Guarda Municipality in 1990 and 1991, after being warned several times because of poor quality of construction projects and lack of monitoring of the construction works. Sócrates was threatened with disciplinary action for wrongdoings in the technical direction of particular works of whose projects he was the author, but despite being ousted from this capacity, he was never penalized. In addition, as a Member of the Parliament, Sócrates was not allowed by law to work as a technical engineer between 1987 and 1991. From 1989 to 1996, he served as a member of the Covilhã Municipal Assembly. He served as spokesperson on environmental affairs for the Socialist Party from 1991 to 1995. In 1995, he entered government as secretary of state for Environment in the first government of António Guterres. Two years later, Sócrates became Minister for Youth and Sports and was one of the organizers of the EURO 2004 cup in Portugal. He became Minister for Environment in Guterres' second government in 1999. Following the elections of 2002 (won by José Manuel Durão Barroso), Sócrates became a member of the opposition in the Portuguese Parliament. Meanwhile, he also had a program of political analysis, hosted jointly with Pedro Santana Lopes on RTP. After the resignation of Ferro Rodrigues as party leader in 2004, he won a bid for the post of secretary-general against Manuel Alegre and João Soares, winning the vote of nearly 80% of party members on 24 September 2004. After the victory of his party in the 2005 Portuguese election, Sócrates was called on 24 February by President Jorge Sampaio to form a new government – the 17th Constitutional Government (after 1976). After the Portuguese legislative election of 2009, held on 27 September 2009, José Sócrates was elected for a second term as prime minister of Portugal. He was also a Member of the Portuguese Council of State as the prime minister. Personal life Family and residence Sócrates is divorced from Sofia Costa Pinto Fava, an engineer, with whom he has two sons, José Miguel Fava Pinto de Sousa (b.