There were fears pro-Brexit peers could deliberately hold up the bill so it could not get royal assent before Parliament is prorogued next week.
But the Conservative chief whip in the Lords announced a breakthrough in the early hours after talks with Labour.