BERLIN >> U.S. President Joe Biden said it’s important for Ukraine’s Western allies to “sustain our resolve” in supporting the country as he met Friday with European partners, with the upcoming U.S. presidential election casting a long shadow over his visit to Germany.

Biden met Chancellor Olaf Scholz of Germany, Ukraine’s second-biggest military supplier after the U.S. They were joined by French President Emmanuel Macron and British Prime Minister Keir Starmer for discussions that also addressed the conflict in the Middle East.

With the election just weeks away and the race extremely tight, there are worries that a victory for Donald Trump, the Republican nominee, could upset the relationships that Biden is hoping to pass on to Vice President Kamala Harris, the Democratic nominee.

Trump has an appetite for imposing trade tariffs on key U.S. security partners. He has expressed indifference to the security of Ukraine, refusing to say during a presidential debate if he wants the U.S. ally to win its war against Russia. He’s voiced doubts about coming to the defense of NATO members if they come under attack.

The gathered leaders never uttered Trump’s name in public, yet their remarks often hinted at the possibility that he could withdraw support from Ukraine and scorn global alliances that Biden and his counterparts view as critical.

Biden in an exchange with reporters following his meeting with the three European leaders suggested that the U.S. election was discussed in the private talks. Asked if the leaders were worried about the presidential race, Biden responded tersely, “They’re interested.”

Earlier in the day Biden emphasized the need to support Ukraine.

“As Ukraine faces a tough winter, we must — we must — sustain our resolve, our effort and our support,” Biden said.

Scholz said that “we will stand beside Ukraine as long as it is necessary,” pointing to a planned $50 billion international loan package funded by interest on profits from frozen Russian assets.

“Our position is clear: We are supporting Ukraine as strongly as possible,” he added. “At the same time, we are taking care that NATO does not become a party to the war so that this war doesn’t culminate in an even bigger catastrophe.”

Scholz has indicated that he’s skeptical about aspects of a “victory plan” drawn up by Ukrainian President Volodymyr Zelenskyy, and says he will stand by his refusal to supply Taurus long-range cruise missiles to Kyiv.

Biden is also opposed to loosening restrictions on letting Ukraine use western weapons to strike deeper into Russia, but did not shut the door on the issue.

“In foreign policy, there’s never a ‘never will I change my mind,’” Biden said. “Right now there is no consensus on long-range weapons.”

Biden didn’t want his term to end without visiting Berlin, after having been to other key allies such as Japan, South Korea, France, India, the U.K., Poland and Ukraine. The visit was a quick one, with Biden spending about 20 hours on the ground in Berlin.

Concerns about what might come next were reflected as Biden received the highest class of Germany’s Order of Merit, which was also bestowed on former U.S. President George H.W. Bush in recognition of his support for German reunification.