Bot, however, rejected arguments from Slovakia and Hungary regarding the legality of the relocation plan, saying that it "helps relieve the considerable pressure on the asylum systems of Italy and Greece", the AP reported.
Hungary and Slovakia question the legal basis for the decision taken two years ago by the European Council, which comprises heads of government and top E.U. figures. The advocate general's position is often an indication of what ruling the court will likely make.
But the court's advocate general Yves Bot, in an official legal opinion, "proposes that the court should dismiss the actions brought by Slovakia and Hungary against the provisional mechanism for the mandatory relocation of asylum seekers".
The programme was created to help ease pressure on asylum systems in Greece and Italy after mass arrivals across the Mediterranean.
Also on Wednesday, that court heard the opinion of a top European Union legal official who argued that it should dismiss a challenge by Hungary and Slovakia against the European Union quota scheme, which aims to redistribute and settle up to 120,000 refugeesand migrants among member-states over a two-year period that ends in late September.
Last month the European Commission launched legal proceedings against Hungary, Poland and the Czech Republic for failing to take in their share of refugees under the scheme.
"None of the arguments they put forward justify that they do not implement the relocation decision", he said.
European Home Affairs Commissioner Dimitris Avramopoulos, meanwhile, said in a written statement that he regretted that certain member states "continue to show no solidarity and to ignore our repeated calls to participate in this common effort".
A 2016 deal with Ankara drastically cut arrivals from Turkey to Greece, making Italy the main gateway to Europe now, with some 94,400 arrivals so far this year across the sea.
"Our objective is and remains to ensure that the people eligible are relocated by end September 2017", he said in Brussels. It also said Rome had to improve registration of those arriving, especially some 25,000 Eritreans, to qualify them for the move.
In a separate decision on Wednesday, the Court upheld Austria and Slovenia's deportations of asylum seekers back to Croatia at the height of 2015 European migration crisis.