WARSAW — Two days after Poland’s president vetoed legislation that would have put the courts under the governing party’s control, the European Union filed a complaint against the government over the proposed changes.

The union, however, backed off its threat last week that it might invoke a never-before-used provision of the European Union treaty that could have resulted in a formal warning to Poland, economic sanctions and potentially a loss of voting rights in the bloc.

In response to the complaint, Poland’s right-wing government told Brussels to keep out of the country’s internal policies.