Big moment on small boats problem - but solution is still far off
It was gone midnight when the moment came.
After so much wrangling and argument, the government's plans for dealing with people crossing the Channel in small boats was signed off by Parliament.
The Illegal Migration Bill will become law.
But hang on: and it is a big but.
The centrepiece of the plan - sending migrants to Rwanda - can't happen at least yet, as it has been challenged in the courts.
The Supreme Court will take a decision in the autumn.
So what happened last night?
The government won a final series of votes in the House of Lords, removing the last obstacle to the plans becoming law.
Opposition in the Lords, for so long so vociferous, dissolved away sufficiently for the government to get its way.
Some peers concluded they had made their point as far as their opposition was concerned, and as unelected parliamentarians, they wouldn't push their point further.
And, for a chamber not known for its abundance of youth, half midnight is mighty late.
Plus, I'm told, some Conservative peers not seen around the place very often, did turn up to back the government.
This morning, through bleary eyes, there is some surprise.
It had been expected the bill would pass this week, but perhaps not as soon as last night.
"Ping has been ponged" said one long standing Lords watcher - a reference to what is known as 'ping pong' when a bill is repeatedly sent from the Commons to the Lords and back again.
But back again, no more - it has passed.
In the short term, the Illegal Migration Act (as it soon will be) will mean, among other things, the mobile phones of those crossing in small boats can be seized and the case a migrant might make upon arrival would be weakened if they have thrown any documents they had into the sea.
But it is acknowledged these are "ancillary" measures while the decision of the Supreme Court is awaited.
A senior government source texted me in the small hours to herald what they saw as a "big win" that had been "unexpectedly smooth".
They added: "I don't think anyone imagined we could pilot through the most significant immigration bill for a generation without any material concessions and without any pressure on the government's majority."
That is a reference to the minimal amount of opposition among Tory MPs.
Opposition that did include, we should remember, the former Prime Minister Theresa May.
Mrs May is hugely proud of her work to tackle modern slavery and has long argued the plan undermines that work.
Government figures acknowledge her criticism is heartfelt and principled, but point out few Conservative colleagues shared her concerns.
In short, they think her objections would hugely undermine their plans but they acknowledge why she's so personally attached to the measures she put into law.
Finding workable solutions to international migratory flows will be one of the biggest challenges relatively rich countries face for decades to come.
This is the government's attempt at something of a solution. Its successors will face similar challenges.
"They'll have to own it now. Will it be fit for purpose? Will it do what it says on the tin? Or will it come back to bite them?" a senior Labour figure asks.