The EU has told Facebook’s head of global affairs, Nick Clegg, to rethink some of the company’s rules aimed at protecting elections from foreign interference.

Věra Jourová, the European commissioner for justice, said the EU had a clear message for Facebook over its approach to ensuring greater transparency about who funds political adverts.

While Facebook has argued it has come up with the right solution, Jourová said the discussion was not finished.

In a potential embarrassment for the former deputy UK prime minister, the EU sent Clegg a stern letter accusing Facebook of ignoring how its law works.

Signed by the EU’s most senior civil servants, the letter includes a short lesson on EU treaty law, which could prove awkward reading for Clegg, a former EU official and MEP. He became Facebook’s vice-president of global affairs and communications last October.

The dispute has arisen over Facebook’s attempts to meet EU demands to clamp down on foreign meddling in elections. The company has introduced rules requiring political advertisers to register in the country that is the target of the campaign.

The EU fears this would prevent European institutions and pan-European political groups from using Facebook, Facebook Messenger and Instagram for continent-wide campaigns, including in the European elections in May.

In the letter, seen by the Guardian, the EU says Facebook’s efforts are “both highly welcome and necessary to protect the integrity of the European elections” but “raise a fundamental concern”.

The letter argues failing to recognise the role of pan-European political parties and institutions “would encroach upon fundamental EU rights and freedoms, such as free movement and political participation. In their current form, Facebook’s envisaged rules would therefore hinder the exercise of EU electoral rights.”

It complains that EU institutions and Europe-wide parties would be treated in the same way “as foreign entities attempting to interfere in the EU elections”.

The letter also contends that Facebook’s rules would prevent EU institutions from running awareness campaigns about the elections on Facebook. “If the new rules were implemented in their current form, in practice our institutions would not be able to promote content on Facebook outside of Belgium,” it says.

“This runs counter to the nature of EU institutions. By definition, our constituency is multinational and our target audience are in all EU countries and beyond.”

The letter, dated 16 April, is signed by the secretaries general of the EU’s most powerful institutions: Martin Selmayr of the European commission, Jeppe Tranholm-Mikkelsen of the Council of the EU and Klaus Welle of the European parliament.

Jourová said: “I believe [Facebook] will seriously consider the letter of the three secretary generals. These are three European institutions which have a clear message for Facebook: you should grasp and you should take into consideration that the EU is one space which has some political actors which are authorised to operate on the whole market.”

She said Facebook had taken a “strict” and “legalistic” approach that had created “understandable frustration’” for European political parties.

Although stressing she was not involved in the discussions, Jourová said the matter was not closed.

The Guardian has contacted Facebook for comment. In an earlier statement released to Politico, the company said: “We weighed the different risks and concluded that the right solution to help best guard against foreign interference is to only allow people to run advertisements in an EU country if they have passed an authorisation process confirming they are a resident in that same country.”