Hungary’s cruel treatment of refugees has reached a new low. On Tuesday, in defiance of international law, the Parliament approved the mass detention of asylum seekers, including children, in guarded camps enclosed with razor wire. The European Union has said in a directive that “Member States shall not hold a person in detention for the sole reason that he or she is an applicant” for asylum; moreover, Hungary’s treatment of refugee children defies international law.

To justify the move, Hungary’s prime minister, Viktor Orban, echoing President Donald Trump’s views, has called refugees the “Trojan horse of terrorism.” When Mr. Orban was denounced by the United Nations and human rights organizations for the new policy, he dismissed the chorus of condemnation as “charming human rights nonsense.”

Though Mr. Orban derides the European Union’s values, Hungary has no trouble taking its support, having received 5.6 billion euros from the union in 2015. With calculated timing, Hungary’s new plan for refugees was approved the day after it got the green light from the union for a Russian-built nuclear plant.

Clearly, Mr. Orban is playing the European Union for a patsy. At what point will the union have the courage to take action against his policies?