In 1880, Bradlaugh was elected as the Liberal MP for Northampton. His attempt to affirm as an atheist ultimately led to his temporary imprisonment, fines for voting in the Commons illegally, and a number of by-elections at which Bradlaugh regained his seat on each occasion. He was finally allowed to take an oath in 1886. Eventually, a parliamentary bill which he proposed became law in 1888 which allowed members of both Houses of Parliament to affirm, if they so wished, when being sworn in. The new law resolved the issue for witnesses in civil and criminal court cases.