Israel’s defense minister told a senior adviser to President Joe Biden on Monday that “military action” was “the only way” to end months of cross-border violence between Israel and Hezbollah, the powerful Lebanese militia.

The defense minister, Yoav Gallant, met with the adviser, Amos Hochstein, who came to Israel in an attempt to prevent Israel’s long-simmering conflict with the Iranian-backed militia from escalating into a broader war. Gallant said Israel needed to “change the security situation on the northern border,” but it was unclear what military action he may be proposing.

The defense minister’s comments appeared to dampen hopes of a diplomatic solution, as the White House has been seeking. Hezbollah and Israel’s military have been trading near-daily fire since October, when the start of the war in the Gaza Strip prompted the militia to launch rocket attacks on northern Israel in solidarity with Hamas.

The cross-border clashes have intensified in recent months, driving tens of thousands of civilians on both sides of the border out of their homes, and as Israel scales down its assault against Hamas in Gaza it has freed up more of its forces for a possible offensive in the north against Hezbollah.

In a statement after Monday’s meeting, Gallant said he had told Hochstein that the window for reaching a diplomatic solution to the conflict was drawing to a close because Hezbollah has decided to “tie itself” to Hamas.

“The only way left to return the residents of the north to their homes is via military action,” Gallant said. Earlier on Monday, Gallant said he had delivered the same message to U.S. Defense Secretary Lloyd Austin in an overnight phone call.

The visit by Hochstein is part of efforts by the Biden administration to prevent “an escalation and a widening of this conflict,” John Kirby, a White House spokesperson, told reporters last week.

“Amos’ travels are very much a continuation of the diplomacy that he’s been conducting now for many months to try to prevent a second front from opening up in the north there,” he said.

On Monday, Hochstein met with Gallant and Israeli Prime Minister Benjamin Netanyahu. In a statement after their meeting, Netanyahu’s office said he had told Hochstein that “while Israel appreciates and respects the support of the US, it will ultimately do what is necessary to safeguard its security and return the residents of the north securely to their homes.”

Hochstein, for his part, disputed Israeli officials’ contention that more military action would accomplish Israel’s goal of returning residents to their homes, according to a person familiar with Hochstein’s meetings Monday, who spoke on the condition of anonymity to discuss a sensitive matter.

Hochstein’s message to Gallant and Netanyahu, the person said, was that the United States did not believe a broader conflict in Lebanon would let displaced Israelis return to northern Israel, and that it risked setting off a much broader and protracted regional conflict. A diplomatic solution would be better in the United States’ view, he told them.

The strikes have driven more than 150,000 people in Israel and Lebanon from their homes in the border region.

Those who have fled their homes in Lebanon have received little assistance from the government, which is in the middle of a prolonged financial crisis. In Israel, the government has paid to feed and house evacuees in hundreds of hotels across the country and faced criticism from residents in northern Israel who have not qualified for assistance.

After his meeting with Hochstein on Monday, Gallant said on social media that he had told the U.S. envoy that “the only way left for us to return the residents of the north to their homes, will be through military action.”

In remarks Sunday, Netanyahu said, “We will do whatever is necessary to return our residents securely to their homes.”