PHILADELPHIA — Federica Mogherini, an Italian diplomat who serves as the European Union’s top foreign policy official, spends most of her time shuttling among Whitehall, the Quai d’Orsay and other elegant bastions of Europe’s foreign policy establishment.

But this week, she was in Philadelphia, soldiering through the heat, the traffic and the peculiar rituals of an American political convention. She was one of an unusually large contingent of European officials who came here to watch Hillary Clinton claim the Democratic nomination for president.

There was an undercurrent of quiet desperation in these visitors. They worried that Donald J. Trump could be elected president and follow through on his threats to end American support for NATO, seek closer ties to President Vladimir V. Putin of Russia and rewrite trade deals. Many were craving reassurance that Mrs. Clinton’s campaign was on track.