The European Court of Justice said that Nestle had to demonstrate the public relied on the shape alone to identify the snack.
The judges concluded this was difficult to prove if goods also showed a brand name such as KitKat.
Rival Cadbury has battled to prevent Nestle obtaining the trademark.
Both Nestle and Cadbury said they were “pleased” with the ruling.
The case will now return to the UK High Court for a final decision.
Nestle claimed that in the 80 years since the chocolate bar was introduced, the four fingers have become almost completely associated with KitKats.
In June, a senior European court lawyer, the advocate-general, disagreed saying such a trademark did not comply with European law.
Nestle has not sought to trademark the two-fingered bar.
Today’s ruling is the latest development in a more than 10-year legal battle between Nestle and Cadbury, which started when Cadbury tried to trademark the purple color it uses on its Cadbury chocolate wrappers.
Nestle objected and finally had the original decision allowing Cadbury to trademark the color overturned in 2013.
Now it would appear Cadbury, which is owned by Mondelez International, has scored a significant but not final victory in the continuing chocolate war.
It has always argued the shape alone was not distinctive enough for consumers to associate it with the rival snack.
A bar called the Kvikk Lunsj, meaning “quick lunch”, launched in Norway in 1937 is available in some UK stores, and although less well known, looks similar to the four-finger KitKat.
A ruling in favor of Nestle would stop other confectionery producers making chocolate bars of the same shape or size.
The US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…