The Polish lower house of parliament, the Sejm, has approved the EU Lisbon Treaty.
Deputies voted 384 to 68 to authorise President Lech Kaczynski to ratify the charter, well clear of the two-thirds majority required.
The result must now be confirmed by the upper house, the Senate, which is expected to vote on it tomorrow.
The treaty's fate in Poland, the largest EU newcomer, had looked secure three weeks ago because both the centre-right government and the opposition supported it.
But the Law and Justice party of conservative ex-prime minister Jaroslaw Kaczynski, the president's twin brother, made a U-turn under pressure from its eurosceptic wing and threatened to vote 'No'.
The about-face cemented Mr Kaczynski's reputation for unpredictability and angered EU partners because he and his brother signed up to the treaty when their party was in power.
The deadlock raised the spectre of a referendum, which could have led to calls for plebiscites across the union, increasing the risk that one of them might kill the treaty.
Only Ireland is currently obliged to hold a referendum.
In Prague, the Czech lower house also approved the Treaty at its first reading today.
Parliamentary approval by both upper and lower houses is expected to take several months.
Prime Minister Mirek Topolanek's party has reservations about the treaty and wants the upper house, the Senate, to sound out the Constitutional Court on whether it is fully in accordance with national law.
However, Mr Topolanek has downplayed any likely problems for the treaty, which needs to be ratified by all EU members before it becomes law.