By Peter William Walsh

Not so long ago, we used to moan about how weak parliament was. Anthony King and Ivor Crewe described it as being, "either peripheral or totally irrelevant". Lord Macdonald viewed the Commons as an "elaborate rubber-stamp" which basically passed whatever legislation was drafted by the government of the day.

That's all changed now. No-one watching the vicious to-and-fro over Brexit would think parliament lacked teeth. This spring it took the extraordinary step of taking control of the timetable and even passing its own legislation.

There's a lesson to be learned here. Parliament has never been as weak as it's made out to be. Dig beneath the surface and you see an institution that, even when it passes legislation, works hard to challenge the executive. What we're seeing here is not a revolution in parliamentary activity, but an evolution.

Take immigration. In 1985, the academic Tomas Hammar found that "immigration policy in Britain is… determined by the executive" and only “legislated and legitimised by parliament". That's still the orthodox view amongst immigration policy researchers today.

But it doesn't really stand up. Parliament is a more important force in migration law-making than has typically been recognised.

Look at the Immigration Act 2014, from when Theresa May was home secretary. It was a tough piece of legislation, whose stated aim was "to create a really hostile environment for illegal immigrants".

Among its provisions were:

the substantial reduction of rights of appeal against Home Office immigration decisions – at a time when over half of such appeals were upheld by the courts

the incorporation of ordinary citizens into a national scheme of immigration control, in which private landlords would be required to check the immigration status of tenants

endowing the government with the power to strip a person of their British citizenship even if it were to render them stateless, a condition labelled "evil" by the UK Supreme Court.

The Hostile Environment policy was supposed to target only illegal immigrants, but it soon caught up migrants in the UK legally and even British citizens. It led to the Windrush scandal and cost the job of May’s successor in the Home Office, Amber Rudd.

And yet even here, with this rather draconian bit of law, you can find evidence of parliament working to soften and liberalise it. It's basically a forensics job, looking for signs of struggle on the bill so you can chart the journey of its policies/provisions onto the statute book. But when you do the work, you find the signs.

As part of my analysis on the legislative process, I conducted 33 interviews with key immigration policy stakeholders, including government ministers, MPs, members of the House of Lords, civil servants, legal professionals, and lobbyists. At the heart of that research was a comparison of the immigration bill the government initially presented to parliament with the version that received Royal Assent.

The conclusion was clear: parliament liberalised, in notable ways, a profoundly restrictive bill. There were 12 changes expanding the individual rights of immigrants, ten of which were due to parliament. These included

limiting the detention of an unaccompanied child in a short-term holding facility to 24 hours

adding university accommodation and refuges to the list of property types exempt from the landlord immigration checks

enabling certain adults to register for British citizenship who would not previously have been eligible due to their father not being married to their mother at the time of their birth

limiting the power of the government to make a British citizen stateless to those cases where there is a belief that the person is able to become a citizen of another country.

It didn't change the world and it didn't stop the bill coming into force. But these changes helped protect people against the harsher ravages of British immigration policy. And they showed, in a quiet and unfussy way, that parliament has often worked behind the scenes, even in those areas of law it is considered weakest, to soften draconian legislation. The idea of a rubber-stamping legislature has never been true.

Now parliament is really finding its teeth. This autumn it is expected to find itself in a do-or-die contest with the government over no-deal. MPs should be reassured that this is just what they've always done: holding the government to account and limiting its worst excesses. It just happens to have become more dramatic.

Peter William Walsh is a researcher at the Migration Observatory at the University of Oxford. His research focuses on UK immigration policy. His doctoral thesis - The Legislature in Immigration Policy-Making: A Liberal Constraint? - examined the role of the national legislature in shaping the immigration law of liberal democratic states.

The opinions in Politics.co.uk's Comment and Analysis section are those of the author and are no reflection of the views of the website or its owners.