Huge protests in Poland last week and over the weekend appear to have had some success in stopping the ruling party's unprecedented attempt to take control of the judiciary.
President Duda's very welcome statement today that he will veto two of the three laws put forward will be a relief to so many Poles, and supporters of democracy around the world. Many of us had hoped the Polish President would step in, and so he has done.
It was also important that the European Commission threatened to impose unprecedented sanctions if the reforms were not scrapped.
But this episode has shown us just how vigilant we need to be to protect our independent judiciary for the sake of everyone in the country. We need our American and EU allies to support democracy and the rule of law in our country now more than ever.
Just a fortnight ago, millions of Poles were moved by a significant speech made by President Trump in the center of Warsaw, directly in front of Poland's Supreme Court.
It was important for our society and nation to see the President of the one of the most robust democracies in the world speaking of universal values of freedom, justice and the rule of law in front of our highest court, which was established in 1917, just as Poland was regaining its independence after 123 years of foreign occupation.
This same court and our entire judicial system was threatened by a party for whom only 2 out of every 10 Poles voted in the last election (although this translated to more than 30% of those who voted and, consequently, gave this party an absolute majority in parliament).
Since the US presidential visit, we have witnessed Polish democracy coming under direct attack.
Could any American - Republican, Democrat or of any other party affiliation - imagine a situation in which any ruling party would introduce a bill which would fire all of the justices of the Supreme Court and have the Attorney General or the President indicate which justice could keep his job and which justice's dismissal would be permanent?
We believe this would be unimaginable in the United States and unthinkable anywhere else in Europe. We were a step away from this becoming the reality in Poland and this battle is, most likely, not yet over.
These particular changes were unconstitutional and contrary to everything Western society has achieved and has defended in numerous wars over the past 250 years - most significantly, these changes would have violated the separation of powers principle and the independence of the judicial branch of government.
Amazingly, such changes to our laws threatened the freedom and fairness of our elections, as it is the Supreme Court which certifies election results in Poland and decides on any protests concerning voting irregularities.
As a lawyer, the rule of law and democratic principles are of the utmost importance. The organization I work for, ClientEarth, uses the rule of law to safeguard the environment across several continents.
And it's the law which is helping to protect the health and heritage of the Polish people - our air quality cases and the legal fight to save Europe's last ancient forest, the Bialowieza, to name but two.
We believe that the Polish nation - aided in such a meaningful way by the American nation - did not fight for close to 50 years to remove a communist and authoritarian regime during which no election was free or fair, in order to now have to contemplate a state in which the ruling party and its appointed judges decide who can take part in and win elections.
There was significant Polish opposition to the changes being pushed through, but the ruling Law and Justice (PiS) party took practically no notice of this opposition or any criticism. People voicing concerns over the state of democracy in Poland and the independence of the judiciary are being branded as traitors and supporters of communism, even though communism was overthrown over 25 years ago and a huge portion of the protesters were born after 1989.
We believe it is no understatement to say that democracy and the rule of law was and still remains under severe threat in Poland. Unfortunately, this phenomenon is not new in history. Fortunately, however, we are able to learn from the mistakes of the past and stop it before it goes too far.
Democracy, pluralism, freedom and the rule of law need to thrive and expand across the globe. Unfortunately, those in government in Poland seek the opposite. While their recent attempts appear to have been thwarted, the world must remain vigilant.