MSPs have voted to reject the post-Brexit trade deal agreed between the UK and the EU, calling instead for a "pause" in the process to reconsider.
The free trade agreement sealed with EU leaders has already been overwhelmingly backed by MPs at Westminster.
But the legislation passed without the devolved consent of Holyrood, after MSPs from the SNP, Labour, Greens and Lib Dems all voted to oppose the deal.
The Scottish Conservatives accused the other parties of "voting for no deal".
First Minister Nicola Sturgeon said this was "frankly an insult to Scotland's intelligence", saying MSPs had voted "on principle against a rotten Brexit that Scotland has rejected all along".
The debate marked the fourth time Holyrood has been recalled during recess, following the death of First Minister Donald Dewar in October 2000, the death of the Queen Mother in April 2002, and the release of Abdelbaset al-Megrahi in 2009.
The last-minute trade agreement will come into force on Friday, with the Brexit transition period ending on 31 December.
Prime Minister Boris Johnson told MPs ahead of the Westminster vote that the trade agreement will allow the UK to "open a new chapter in our national story" and to to take "control of our laws and our national destiny".
But he also said the UK intends to be the EU's "best friend and ally".
The European Union (Future Relationship) Bill was backed by MPs by 521 votes to 73 - with Labour MPs whipped to support the Conservative government to avoid a no-deal exit.
The SNP also want to avoid a "no-deal" exit - but with that seemingly assured, the party's MPs ultimately voted against the deal.
Ms Sturgeon said it was "far better" for SNP MPs to "cast a principled vote against Brexit" and get on with campaigning for Scottish independence.
The Scottish Conservatives said this "political posturing" was "reckless and pathetic" and accused the SNP of "rank hypocrisy".
At Holyrood, MSPs approved a Scottish government motion which said parliament "does not consent to" the UK legislation.
The motion said that "while a no deal outcome must be avoided", the deal negotiated with EU leaders "would cause severe damage to Scotland's environmental, economy and social interests".
It said the legislation "will receive severely limited scrutiny" in particular from the Scottish Parliament, and called on the UK government to "seek a pause in current implementation while special arrangement are made to take account of these difficulties".
Opening the debate, Ms Sturgeon said Scots should not have to accept a "choice between a terrible outcome and an even worse one".
She said: "We can do better. We do not have to accept whatever dismal future the Tories want to foist on us.
"It is time for Scotland to get the best possible deal - a future as an independent European nation."
'Weaponising the referendum'
The motion passed by a margin of 92 to 30, with all parties bar the Scottish Conservatives having united behind it.
Tory group leader Ruth Davidson said the SNP were "acting in their own narrow self-interest by voting against the very thing they have spent months demanding - an EU trade deal".
She added: "Throughout, the SNP has asked one question of itself - not what can be practically delivered, but how can Brexit be used to crank up grievance and promote the only thing Nicola Sturgeon has ever cared about: independence.
"This was never really about the substance of leaving the EU - this was always solely about weaponising the referendum result to widen the divisions on which they thrive."
Scottish Labour voted to reject the deal at Holyrood despite backing it at Westminster, but leader Richard Leonard said the two parliaments were voting on different propositions.
He said Labour MPs at Westminster would "reluctantly vote for the deal because the alternative will be chaos", but said members in Scotland and Wales were more free to express dissatisfaction with the process.
Mr Leonard said the agreement with the EU was "a bad deal for Scotland" and called on the government to provide extra funding for businesses in sectors adversely affected by it.
Scottish Green co-leader Patrick Harvie said his party "refuse to accept this false choice between a calamitous no-deal and the Prime Minister's version, which still drags Scotland out of Europe".
And Lib Dem leader Willie Rennie said the deal was "bad for jobs, business, our environment and our way of life" - adding that this should be a lesson for those advocating independence.
The UK government is expected to press ahead with the legislative process regardless of the vote at Holyrood, with proceedings at Westminster due to continue through the evening.
The "Sewel convention" of devolved consent holds that the UK government would "not normally" legislate across areas which the administrations in Edinburgh, Cardiff and Belfast are responsible for without the express consent of the devolved legislatures.
However, the Brexit process has seen UK ministers press ahead with several pieces of key legislation rejected by MSPs, arguing that departure from the EU is not a normal set of circumstances.