He was elected to the Northern Ireland Forum in 1996 representing Foyle. Having contested Foyle unsuccessfully at the 1983, 1987 and 1992 Westminster elections, he became MP for Mid Ulster in 1997 and after the agreement was concluded, was returned as a member of the Assembly for the same constituency. He was nominated by his party for a ministerial position in the power-sharing executive, where he became Minister of Education. One of his acts as Minister of Education was his decision to scrap the 11-plus exam, which he had failed as a child. He was re-elected to the Westminster Parliament in 2001, 2005 and 2010.