Iain Duncan Smith has vowed to fight European Commission demands to ease restrictions on immigrants' access to benefits.
A source close to the Work and Pensions Secretary insisted he would not "cave in" to legal action over the right-to-reside test imposed on nationals from EU member states.
The check is said to be discriminatory because it goes beyond the standard eligibility criteria for welfare payments.
The Commission is set to make a formal announcement later, but Mr Duncan Smith has indicated he will "see them in court" if they try to strike out the test.
"He will not be dictated to on what he can and cannot do," the source said. "It is his responsibility to do all that he can to stop abuse and benefit tourism in this country."
A Government spokesman said the right to reside test was a "vital and fair tool" to ensure benefits were only paid to people legally allowed to live in the UK.
Adam Weiss, legal director of the Advice on Individual Rights in Europe centre, who made the original complaint to the Commission, said the UK was unlawfully discriminating against EU citizens by paying benefits to British and Irish citizens but not to EU citizens.
He told BBC Radio 4's Today programme: "The problem is that there is an extra test which the UK applies. British and Irish citizens always pass this so-called right to reside test but other EU citizens do not always pass that test and as a result they are often refused certain benefits in circumstances when British citizens and Irish citizens would receive them.
"What EU law says is that in relation to these benefits, discrimination based on nationality is prohibited so it is not fair, it is not lawful, to discriminate, to favour British and Irish citizens on the one hand and to discriminate against citizens of other EU member states on the other hand."
But former social security secretary Peter Lilley, who introduced the habitual residence test, said the Commission was "flying in the face of its own rules" as the right-to-reside rule is based on a European directive.
Mr Lilley - now a member of David Cameron's Tory policy board - said the UK tightened up that rule in 2004 based on the directive, under which EU citizens who passed the habitual residence test but were not working would not pass the right-to-reside test and so would not be entitled to benefits such as Jobseeker's Allowance.
The MP said the Commission's actions strengthened the case for Mr Cameron to repatriate powers from the EU.
He told Today: "The European Commission is now saying that our Jobseeker's Allowance is not social assistance, even the non-contributory bit of it. That seems to me flying in the face of their own rules, but in any case is an attempt by them to extend their competence into areas where the treaties say they shouldn't be involved.
"To extend it to others would be costly, unwelcome, undemocratic, not approved by Parliament and I hope we will strongly resist this."
He went on: "It does strengthen the case for David Cameron seeking to get power back to this country to make our own laws rather than allowing this creeping competence of law-making being extended to Brussels, even in areas where every single country decided it should be reserved for itself."
UK Independence Party leader Nigel Farage described Mr Duncan Smith's promise not to cave in as "a very bold assertion that he is making in vain".
Mr Farage said: "EU law has precedence over UK rules. This specific requirement built in to UK legislation goes beyond EU legislation and rubs against the principle of free movement of labour which is the keystone of the whole EU project...
"The very fact that the Commission has the audacity to haul the UK Govenrment in front of the European Courts of Justice for a very long and expensive trial is clear evidence that in a Britain versus European Union fight, we just don't win.
"The claim by the Conservative Government that they can in some way protect the UK against exploitation of our benefits system, or the assertion by David Cameron that he can somehow change our relationship with the EU and soften Brussels' stranglehold on its 27 member states, is being embarrassingly undermined."