But May will surely be able to live with that defeat. The Spelman amendment, after all, is not legally binding.
There has been a great deal of talk in recent weeks that Parliament itself would take control of the Brexit process from Theresa May and Downing Street.
Last night the exact opposite happened. Theresa May took back control of Brexit from Parliament. As a result, she looks more secure in her job than she has done for a very long time.
Nor was that vital strategic win the only matter for Downing Street celebration. As Tory MPs united behind May's deal, Jeremy Corbyn's Labour Party split wide open as a dozen Labour rebels defied a three-line Labour whip over the Cooper amendment and thereby saved May's skin – just.
But I would warn against too much exultation in Downing Street. The Prime Minister has paid a price for her victory in terms of personal reputation and credibility.
Let's not forget her new strategy involves going back to the deal she defended for so long – one she agreed with the 27 other nations of the EU less than two months ago.
Before Christmas, Theresa May signed up for the so-called 'Irish backstop'. This gave a guarantee that there would never be border controls between Ireland and Northern Ireland.
But the plan was hated by Brexiteering Conservative MPs because they feared the European Union would use the backstop as a device to keep Britain in the European customs union for ever.
After days of frantic backstairs plotting, Mrs May has won their support by promising to ditch the backstop. She will now ask to open negotiations with Europe for so-called "alternative arrangements".
By doing so, she's kept Britain on course to leave the European Union on March 29 - just 58 days from now.
However – and I say this with a heavy heart as a supporter of the PM – last night's victory has come at the cost of a pretty dramatic U-turn from the PM.
She has only secured her survival by scrapping a deal which she personally agreed to barely eight weeks ago. Back then, remember, she insisted that the backstop was unchangeable.
Now she appears to believe that it can be rewritten after all. What is more, Mrs May seems to think that she can do this in the next two weeks, having promised to come back to the Commons by February 13 for a second "meaningful vote".
To many this looks like dreamland, for many in Brussels will take a dim view of Britain's decision to renege on a deal that was struck last year – and go back demanding changes.
It needs to be said that May is not the only one who has shifted their position. Labour leader Jeremy Corbyn is equally guilty.
He hypocritically opposed May's proposal last night, even though he was actually against the backstop in the first place!
Last night, May criticised Corbyn for facing both ways over Brexit. So what next? What follows in the coming days is essentially an almighty act of brinkmanship.
The Prime Minister must now set herself directly at odds with the European Union.
Essentially, she is making the brutal calculation that the EU leaders will dump the backstop by renegotiating the agreement.
Last night, all the indications were that they would refuse to do so.
Earlier in the evening, French President Emmanuel Macron warned that there would be no renegotiation on the backstop. His words were endorsed shortly after the vote by the EU president Donald Tusk, who announced that "the Withdrawal Agreement is not open for re-negotiation".
This means we have entered terrifyingly unpredictable territory.
The possibility of a No Deal Brexit has suddenly become far more likely, with all the potentially catastrophic consequences of economic meltdown it involves. No wonder sterling was falling in value last night.
May has opened herself to the charge of putting the Tory party before the country. Perhaps she will not mind that too much.
Don't underestimate the depth of the fears that the party could split in two between hardline Brexiteers and the rest as a consequence of Brexit. That outcome has now been postponed, though not put off altogether.
So May's triumph is far from complete. With less than 10 weeks to go till Brexit Day, there is still a great deal to be achieved. What if the EU keeps to its word and refuses to budge?
There may yet be a mighty arm-wrestle to come. There will be celebration in Downing Street today, but I predict it won't last long as minds turn to the battle ahead.