Update 24/07/2017, 01:06 – Government officials are denying Dziennik Gazeta Prawna‘s report, insisting that only superficial numbering changes were made to the bill. We will continue to update on this story as the details become clear.

Over a week of protests continued today across Poland as thousands demanded that President Andrzej Duda veto a controversial bill placing the Supreme Court under closer government control. After approval by the Sejm (lower house) and the Senate, Duda was the only thing standing in the way of a reform which would force all sitting Supreme Court judges to resign and be replaced by the government.

Or so they thought.

Dziennik Gazeta Prawna is now reporting that the version of the bill approved by the Senate on Saturday is, in fact, not the same as the version approved by the Sejm earlier in the week.

Ordinarily, the Marshal of the Sejm presents bills which have been passed by the lower house to the Senate, where they are then debated further and, if approved, sent on to the president for signature or veto.

However, according to the report, it seems the Marshal may have given the Senate a draft of the bill which differs from the final version approved by the Sejm in as many as 11 places, some of which are key to its implementation.

Polish legal scholars believe that, in such a situation, it would be unconstitutional for President Duda to sign the Senate bill. Instead, he would have the options to veto it or refer it to the Constitutional Tribunal, a judicial body which rules on the constitutionality of state actions. (Note: This is not the same as the Supreme Court, which is the last court defendants can appeal to and which rules on separate issues like the legitimacy of elections.)

If the bill is sent to the Constitutional Tribunal, many observers expect them to approve the Senate version for the president to decide on, especially after the far-right PiS party (which supports Duda) reorganized the Tribunal in late 2015 to place it under greater government control in another move which was highly controversial, internationally condemned, and sparked a constitutional crisis.

Anna Wajner contributed to the reporting for this article.