The Israeli military warned Lebanese civilians not to return to villages deep in the country’s south on Thursday, as thousands of people made the trek back to their war-ravaged communities on the first full day of a U.S.-brokered cease-fire between Israel and Hezbollah.

The agreement, which took effect at 4 a.m. local time on Wednesday, appeared to be holding on Thursday. It ended more than 13 months of cross-border fighting and an Israeli ground invasion that ushered in Lebanon’s deadliest conflict since the end of its civil war in 1990.

The war forced roughly a quarter of Lebanon’s population to flee their homes, and when the cease-fire began, many were eager to return. But on Thursday, the Israeli military said it had opened fire on people arriving in several areas of southern Lebanon because they were violating the agreement.

Avichay Adraee, an Arabic language spokesman for the Israeli military, warned residents who had fled those towns to stay away “until further notice.” He also said movement within those towns was prohibited.

The Israeli military “does not intend to target you and therefore you are prohibited at this stage from returning to your homes from this line south until further notice,” Mr. Adraee said in an online post that included a map showing part of the country’s south marked in red. “Anyone who moves south of this line — puts himself in danger.”

Some of the most heavily damaged communities in Lebanon are the towns along its border with Israel. For years they were effectively governed by Hezbollah, the militant group backed by Iran.

Beginning in October 2023, the group used those towns to launch near-daily rocket attacks on northern Israel in solidarity with Hamas, its Iran-backed ally in the Gaza Strip. The attacks forced tens of thousands in Israel to flee their homes. But few Israelis appeared eager to rush back when the truce began.

Israel intensified its military response to Hezbollah’s attacks in mid-September and began a ground invasion on Oct. 1. The war killed about 3,800 Lebanese and 100 Israelis, according to their governments.

Under the cease-fire agreement, both Israel and Hezbollah will observe a 60-day truce. During that time, Israel will gradually withdraw its military from Lebanon, and Hezbollah will move its fighters out of southern Lebanon, creating a sort of buffer zone between Israel’s border and the Litani River.

The area will be policed by a U.N. peacekeeping force and Lebanon’s military, which has not been a party to the conflict between Israel and Hezbollah. The deal was mediated by the United States and France, and formally accepted by the governments of Israel and Lebanon.

But the timeline for complete implementation of the agreement remains uncertain. Israel has said its actions will depend on how events unfold in Lebanon, and has vowed to strike if it sees Hezbollah resume hostile activity. A similar cease-fire that ended a war between Israel and Hezbollah in 2006 was never fully enforced.