BUDAPEST, Hungary (AP) – The advocate general for European Union’s highest court on Thursday urged the court to rule that Hungary violated the bloc’s laws on asylum when it passed legislation narrowing the possibilities for asylum-seekers to receive international protection.

The non-binding opinion from the European Court of Justice’s Advocate General, Athanasios Rantos, states that the 2018 amendments to Hungary’s asylum laws – which prohibited asylum-seekers who passed through safe countries en route to Hungary from receiving international protection – violated EU law.

“By introducing that ground for inadmissibility, Hungary has failed to fulfill its obligations under the Procedures Directive,” Rantos wrote, referring to the EU’s asylum protocols.

Opinions by advocates general are often but not always followed by the European Court of Justice, which will make a final ruling on the case at a later date.

The European Commission, the bloc’s executive branch, brought the case before the court as part of an infringement procedure it launched against Hungary in 2018 over its non-compliance with asylum law.

Rantos also advised the court to rule that a Hungarian law that cracks down on organizations and individuals that provide legal assistance to asylum-seekers violates EU law. The legislation, known as the “Stop Soros” law, was an amendment to Hungary´s criminal code that threatened aid workers and human rights advocates working with asylum-seekers with up to a year in prison. It was approved by the Hungarian parliament in 2018.

The law was named after Hungarian-American philanthropist George Soros, a pro-democracy advocate who has long been a target of the Hungarian government.

Hungary’s right-wing government has been a staunch opponent of immigration, and its treatment of migrants have brought it into frequent conflict with the rest of the 27-nation EU. Last year, the country closed its transit zones – enclosed areas along the southern border with Serbia used to hold asylum-seekers while their asylum requests were being decided – after the European court ruled they amounted to detention and thus violated EU law.

Last month, the EU´s border control agency, Frontex, suspended operations in Hungary after the government in Budapest did not comply with a December ruling by the European court that ordered Hungary to grant protection to asylum-seekers as required by law and to stop returning them to Serbia.

The country’s prime minister, Viktor Orban, claims he is seeking to protect Hungary’s conservative Christian identity and to defend Europe from immigration from the Mideast and Africa.