BUCHAREST (Reuters) - Romania s lower house of parliament approved on Wednesday legislation to overhaul its justice system, legislation that the European Commission, the U.S. State Department and the country s president have criticized as threatening judicial independence. Two bills, and a third which was approved on Monday, are part of a wider overhaul that has triggered street protests across the country in recent weeks and which thousands of magistrates oppose The European Union state, ranked as one of the bloc s most corrupt, joins its eastern European peers Hungary and Poland, where populist leaders are also trying to control the judiciary, defying EU concerns over the rule of law. Romania s ruling Social Democrats, which command an overwhelming majority in parliament together with their junior coalition partner, ALDE, have so far ignored the protesters. Changes approved on Wednesday include setting up a special unit to investigate criminal offences committed by judges and prosecutors. This makes magistrates the only professional category with a system dedicated to investigating them. The bills also enforce more restrictive criteria for prosecutors seeking to join anti-corruption and anti-organized- crime prosecuting units. On Monday, lawmakers approved a bill that changes the way magistrates are supervised and amends the definition of prosecutor activity to exclude the word  independent .  The three bills must now be approved by the senate, with a vote expected next week. Opposition parties and President Klaus Iohannis could also challenge the bills at the Constitutional Court, but the outcome of that was unclear. The ruling Social Democrats also plan changes to the country s criminal code. In November, the European Commission said justice reform has stagnated this year and challenges to judicial independence remain a persistent source of concern. At the start of this year, attempts by the Social Democrats to decriminalize several corruption offences triggered the country s largest street protests in decades. Romanian prosecutors have investigated thousands of public officials in an unprecedented crackdown on top-level graft. The lower house and senate speakers are both currently on trial in separate cases. 