Spain is accusing the UK of acting illegally in making Gibraltar a part of the south west of England region at the last European Parliament elections.
Gibraltar had its first European Parliament vote in 2004
It has taken the case to the European Court of Justice in Luxembourg.
The UK said Gibraltar was added to a larger region to ensure its residents had the right to vote despite it being too small to have its own Euro MP.
Spain says Gibraltarians could have voted without being linked to a UK region. A verdict is due next year.
The territory, which has fewer than 20,000 voters, joined the rest of the south west's 3.8 million-strong electorate in last summer's European elections.
The British government says its action was the only way to fulfil a European Human Rights Court decision in 1999 that residents of Gibraltar must have a vote in the European Parliament elections.
Spain complains that it was illegal for Gibraltar to be included in the south west region for the elections.
It also argues that UK election law breaks EU rules by allowing Commonwealth citizens who live in the UK to vote in European elections, even if there are not EU citizens.
And Spain says voting rights were given to Gibraltarians by amending British law and not by changing European laws on direct elections.
The verdict on that part of the Spanish case could have an impact on Commonwealth citizens' right to vote in European elections even if they do not live in Gibraltar.
The UK has held Gibraltar since 1704. Spain ceded sovereignty in 1713 but has repeated claims to the territory, which is at its southern tip.
Graham Watson, Liberal Democrat MEP for the South West region, said the Spanish case owed more to "political spite" than rational argument.
He said: "Commonwealth nationals have always voted in European elections in the United Kingdom. All that happened in 2003 is that the same UK franchise was extended to Gibraltar.
"It is curious that Madrid has not raised this complaint before given that they clearly feel so strongly about it now."
Mr Watson said Spain had blocked changes to the European elections law. He argued the voting rights were logical because Gibraltar had been EU territory since 1973.
Neil Parish, Conservative MEP for the South West, said the case was sad and politically motivated.
"Spain is determined to make life difficult over Gibraltar because the Spanish Government knows there is absolutely no chance of making progress on the sovereignty issue," he said.
"This would affect a handful of people in Gibraltar. But it could potentially disenfranchise a million people living in the UK."