|By Alastair Macdonald and Robert-Jan Bartunek

|By Alastair Macdonald and Robert-Jan Bartunek

BRUSSELS (Reuters) - EU foreign policy chief Federica Mogherini warned the Turkish government on Monday against taking steps that would damage the constitutional order following a failed weekend coup.

"We were the first... during that tragic night to say that the legitimate institutions needed to be protected," she told reporters on arrival at an EU foreign ministers meeting, which was also to be attended by U.S. Secretary of State John Kerry.

"We are the ones saying today rule of law has to be protected in the country," she said in Brussels. "There is no excuse for any steps that takes the country away from that."

She also said: "The democratic and legitimate institutions needed to be protected. Today, we will say together with the ministers that this obviously doesn't mean that the rule of law and the system of checks and balances does not count."

"On the contrary, it needs to be protected for the sake of the country itself. So we will send a strong message."

Other ministers also expressed concerns about events after the coup. Mogherini's fellow EU commissioner, Johannes Hahn, who is dealing with Turkey's membership request, said he had the impression that the government had prepared lists of those such as judges to be arrested even before the coup took place.

"It looks at least as if something has been prepared. The lists are available, which indicates it was prepared and to be used at a certain stage," Hahn said. "I'm very concerned. It is exactly what we feared."

Belgian Foreign Minister Didier Reynders said he was also concerned about the arrests of judges and also about President Tayyip Erdogan's suggestion of reintroducing the death penalty for plotters. That, Reynders said, "would pose a problem with Turkey’s ties with the European Union".

Abolishing capital punishment, as Turkey did in 2004 before it could open the formal process of accession negotiations with the EU, is a prerequisite for holding talks on membership.

Reynders said: "We cannot imagine that from a country that seeks to join the European Union. We must be very firm today, to condemn the coup d’etat but the response must respect the rule of law.

French Foreign Minister Jean-Marc Ayrault said: "We cannot accept a military dictatorship but we also have to be careful that the Turkish authorities do not put in place a political system which turns away from democracy ... The rule of law must prevail ... We need authority but we also need democracy."