Political career
Within a week of arriving in Aberystwyth, Williams became secretary of the student group and met local Liberal MP Geraint Howells. After graduating, he became a part-time researcher to the Liberal peers in the House of Lords, but was determined to stay in Ceredigion and spent half the week and all of the Parliamentary holidays as assistant to Howells in Ceredigion, until he lost the seat at the 1992 general election.
Williams then returned to student life at the teacher training college in Exmouth, part of the University of Plymouth. After securing this qualification, he taught in primary schools in Penzance and Barnstaple, before becoming a deputy headteacher in Llangors School, Powys in 2000. During this period, Williams fought Monmouth at the 1997 general election, finishing third.
In February 2000, after a spell as President of Ceredigion Liberal Democrats, Williams was selected to fight the Ceredigion seat in the by-election caused by the resignation of Cynog Dafis. In that by-election, the Liberal Democrats rose back into second place, and in the general election of 2001 consolidated that by coming second, being just 3,944 votes behind Plaid Cymru. In May 2005, 13 years after Howells had been defeated, the Liberal Democrats regained Ceredigion, with Williams as their candidate, by a very narrow majority of 219 votes. Williams described his victory as an "amazing result", while the then Welsh Liberal Democrat leader, Lembit Öpik, said that "Mark Williams has pulled off the result of the night in Ceredigion". Williams was the first non-Welsh-speaking Member of Parliament to represent the constituency since the widening of the electoral franchise in 1867. In 2010, he substantially increased his majority, winning just over 50% of the vote; this was the first time any candidate had won more than 50% of the vote in Ceredigion since 1959.
Williams sat on the Welsh Affairs Select Committee between 2005 and 2017, and held various shadow ministerial roles in the 2005–2010 Parliament. He called for Saint David's Day to be made a public holiday in Wales. He proposed a private member's bill with the backing of a leading charity to update child protection legislation. It would amend the Children and Young Persons Act 1933, because this only covers physical harm, and not psychological neglect. The bill is backed by Action for Children.
Williams was defeated in the 2017 general election by Ben Lake of Plaid Cymru, whose majority of 104 made the seat one of the most marginal in the country. The result left the Liberal Democrat Party without an MP in Wales, a situation which had not existed since the founding of the Liberal Party in 1859. He resigned as leader of the Welsh Liberal Democrats shortly after his defeat.
Williams unsuccessfully re-contested Ceredigion in the 2019 general election, falling to third place behind Plaid Cymru and the Conservatives. Following this, he paid tribute to Lake, and then subsequently announced that he would not stand for parliament again.
In December 2022 Williams was among 32 individuals and entities banned from entering Iran by the Iranian Ministry of Foreign Affairs for views which the Iranian regime claim “promote terrorism and violence”. Responding to this Williams said: “I have always been steadfast in my support for a free and democratic Iran...The campaign for justice in Iran will go on regardless of any sanctions by the Iranian regime."
In May 2023, he was reselected to stand in Ceredigion Preseli at the 2024 general election. He lost the election by coming in second place.