The Brazilians are due back in Brazil late on Monday evening, the ministry said, and are expected to meet with President Luiz Inacio Lula da Silva.
The Palestinian enclave has been under bombardment by Israel, which aims to destroy Hamas militants who attacked Israel from Gaza on Oct. 7.
The slow pace of release of the trapped Brazilians increased friction between Brazil and Israel, which erupted last week after Israeli spy agency Mossad said it helped foil a Hezbollah attack in Brazil.
An appearance by Israel's ambassador to Brazil with former President Jair Bolsonaro, a staunch Israel ally and longtime Lula political foe, also irked Brazilian officials.
Reporting by Camila Moreira; Writing by Gabriel Stargardter; editing by Grant McCoolOur Standards: The Thomson Reuters Trust Principles.
Persons:
Luiz Inacio Lula da Silva, Jair Bolsonaro, Lula, Camila Moreira, Gabriel Stargardter, Grant McCool
Organizations:
Hamas, Maxar Technologies, REUTERS Acquire, SAO PAULO, Thomson
Locations:
Rafah, Gaza, Egypt, Israel, Palestinian, Brasilia, Cairo, Brazil