Israel has a duty to guarantee "safe corridors" for civilians in Rafah before conducting any incursion against Hamas in the southern Gaza city, Germany's foreign minister said Wednesday.

Hundreds of thousands of people had fled from the north of Gaza to Rafah on Israel's advice previously, said Annalena Baerbock.

"If action is to be taken now against the terror organisation in Rafah, then it is ... the responsibility of the Israeli army to provide safe corridors for the people who have sought protection there," she said, following talks with Palestinian foreign minister Riad al-Malki in Berlin.

"These parents, these children, these families can't just vanish into thin air. They have nowhere to go to -- not further south in any case," said the minister.

The border to Egypt is located to the south of Rafah, and the crossing remains closed to Gazans.