The court found that agreements that included non-direct foreign investment ('portfolio' investments made without any intention to influence the management and control of an undertaking) and the regime governing dispute settlement between investors and states would have to be ratified by member states.
Such deals would still need clearance by the EU Council, the grouping of EU governments, and the European Parliament.
In response to the ECJ ruling, a Ministry of Trade and Industry spokesman said that Singapore is committed to working with the commission to ratify the trade agreement expeditiously, and have it provisionally applied so that businesses can utilise the parts of the agreement that are under the EU's exclusive competence. "We learn new things along the way", he said. "The EU, its member states and Singapore can now work towards the implementation of the free trade agreement, which the United Kingdom has long supported".
Paul de Clerck, economic justice programme coordinator at Friends of the Earth Europe, said: "Involving national parliaments in the ratification of free trade agreements will increase the democratic scrutiny and give citizens a stronger voice". The Luxembourg-based court's rulings are binding and can't be appealed.
Traditionally, the commission is given a mandate for trade talks by EU members states, but the final agreement has to be approved by EU ministers and the European parliament before it comes into force.
"The free trade agreement with Singapore can not, in its current form, be concluded by the European Union alone", it said.More news: US spat erupts ahead of Trump visit to region
It sets the scene for a repeat of the chaos surrounding Canada's Comprehensive Economic and Trade Agreement (Ceta) with the European Union, which came close to foundering after seven years of negotiation last year because of opposition in the Walloon regional parliament in Belgium.
A statement from the ECJ described the EU-Singapore deal, which the two sides agreed in 2013, as "one of the first "new generation" bilateral free trade agreements", because in addition to classic provisions on cutting duties and non-tariff barriers, the deal touched on intellectual property protection, investment and public procurement.
The EU Court concluded that the EU did not have exclusive competence in the field of non-direct foreign investment since the conclusion of the agreement is not capable of affecting EU acts or altering their scope in that field.
In its decision, however, the court has narrowed the competences it shares with the European Union member states. There is strong opposition to the system for settling disputes between investors and governments, called Investor-state dispute settlement (ISDS). This was when Europe discovered that Belgium's federal arrangements meant the region of Wallonia - with a population of 3.5 million - could scupper the entire deal.
Graphic: http://tmsnrt.rs/2pzabB4The European Commission, which runs trade policy for the EU, had hoped Brussels - where national governments also have a say - might be free to implement deals without having to consult assemblies, such as that of Wallonia in Belgium that almost wrecked an accord with Canada a year ago.
A possible path for Mrs May could be to negotiate a narrow deal that cuts out many of these issues.