GENEVA/BEIRUT - Almost 20,000 people have been internally displaced in south Lebanon and elsewhere since early October, a U.N. agency said on Monday, as violence escalates on the Lebanese-Israeli border following the eruption of the Gaza war.

The International Organization for Migration said 19,646 people had been displaced inside Lebanon since it began tracking movements on Oct. 8, the day after an assault on Israel by Hamas militants and an Israeli counteroffensive on Gaza.

It said the movements were mostly by those fleeing the south of Lebanon, while some people have also moved from other areas.

Israeli authorities have also been evacuating dozens of towns and communities from the north of Israel.

Lebanon's heavily armed Hezbollah group and Israel have been exchanging fire on an increasingly frequent basis along the border in the worst escalation since the two sides fought a war in 2006.

Many who have fled south Lebanon have moved north to the coastal city of Tyre, which is 18 km (11 miles) from the border.

Inaya Ezzeddine, a lawmaker from Tyre, said the movement was putting a strain on families hosting the displaced and the government of a country struggling with an economic crisis.

"This war is happening amid a very big economic crisis and people don’t have provisions," Ezzeddine said, adding that around 6,000 people had sought refuge in Tyre and three schools had been used to shelter some of them.

"We cannot open all schools because schools are still operating, every school we open (for the displaced) we’re depriving its pupils from using it," she added.

School teacher Yolla Ali al Swaid fled to Tyre after she was injured in the shelling that hit her home in the border village of Dhaira, an area where there have regularly been exchanges of fire.

"The school's four floors are all full. We’re 11 people in the room with my sister family," Ali al Swaid told Reuters, adding the crowding was encouraging some people to consider going back home.

"There are people who are thinking about hanging white sheets on their homes when they go back there," said Swaid, who also fled her home in the war in 2006.

Hezbollah says 27 of its fighters have been killed in the clashes since Oct. 7, while Lebanese security sources say 11 fighters from Palestinian groups in Lebanon, which are allied to Hezbollah, have also died.

Israel's military says seven troops have been killed along the frontier area.

(Reporting by Emma Farge in Geneva and Riham Alkousaa in Beirut; Editing by Edmund Blair and Alison Williams)