BRUSSELS (Reuters) - German Chancellor Angela Merkel warned U.S. President Donald Trump on Friday that Europe would react in kind if the United States did not play fair in trade, while EU leaders also agreed to consider screening investments by state-owned Chinese firms.

U.S. President Donald Trump talks to German Chancellor Angela Merkel (L) and Tunisia's President Beji Caid Essebsi (2-L) at the G7 Summit expanded session in Taormina, Sicily, Italy May 27, 2017. REUTERS/Jonathan Ernst

The 28 EU leaders signed up to a document saying they and the European Commission should look into ways to increase reciprocity in government procurement and investment.

“Reciprocity is the right way. If we have for example access to public contracts in the United States, then we can say ‘yes’ to access to public contracts in Europe,” Merkel said, but if full access was denied then Europe would “need an answer”.

The leaders called on the Commission to analyze foreign investments in strategic sectors, adding they would return to the issue at a future meeting.

The written conclusions to the European Union summit that ended on Friday made no mention of the bloc’s two largest trading partners, the United States or China, but both were in the background of its “free and fair” trade push.

The 28-nation union tried for three years to forge a trade alliance with the United States, but now sees itself as an open markets counterweight to a country whose President Donald Trump is looking at restricting steel and aluminum imports.

Beijing is also in the sights of the “protection agenda” of new French President Emmanuel Macron, described as an embrace of free trade, but with limits on foreign takeovers in areas such as energy, banking and technology, where China seeks Europe’s know-how.

An EU-China summit earlier this month, designed to show the two as allies in climate change after the U.S. withdrawal from the Paris accord, was overshadowed by disagreements over trade and over-production of steel.

“Fair competition is better than the law of the jungle,” Macron told a news conference alongside German Chancellor Angela Merkel.

France, Germany and Italy have backed the idea of allowing the EU to block Chinese investments, partly because European companies are denied similar access in China.

More pro-trade countries such as Sweden have said this is a step down the path of protectionism, while smaller eastern and southern European economies that are dependent on Chinese investment have rejected steps against Beijing.

New Irish Prime Minister Leo Varadkar said it made sense to screen foreign investments to ensure that public infrastructure or defense firms did not to fall into foreign state-owned hands.

“The key thing we wanted to avoid was any effort to use this proposal as a Trojan horse for protectionism,” he said.

Trade, agreed the EU leaders, created growth and jobs, encouraging progress in trade negotiations with countries in the Americas and Asia.

“I think that a time when protectionism is strongly on agendas, the European Union’s commitment to a free and rule-based trading system is very important,” Merkel said.

The most advanced talks are with Japan, with the EU’s chief negotiator in Tokyo seeking a breakthrough that would allow a provisional deal to be signed in early July. The EU wants Japan to scrap tariffs on cheese and wine, while Tokyo is seeking greater access for cars and car parts.