ROSETTA, Egypt — President Abdel-Fattah el-Sissi said on Monday that Egyptians must join hands with the government to prevent a repeat of the tragedy that struck last week when a Europe-bound boat carrying hundreds of migrants sank off Egypt’s coast, drowning at least 170 people.

In his first public comments on the incident, el-Sissi said the government could not alone safeguard the country’s porous land and sea borders. “As a state, along with its institutions, we are concerned and committed to safeguarding our borders and preventing this, but society must contribute to the effort so this is never repeated.”

Many of the Egyptians who were on board the boat were unescorted minors or single men in their early 20s looking for work in western Europe. Egypt’s economy has been battered by years of unrest since the 2011 uprising, and now suffers from double-digit unemployment and inflation.

El-Sissi used his televised address to reassure Egyptians that everything was being done to revitalize the economy, but also to urge patience.

“There is hope, but we will not be able to overcome all the challenges in one, two or four years. No, it will take time,” he said.

Addressing young people who are set on leaving the country through illegal migration, he said: “Don’t leave your country and go, you can develop it if you will just join hands with us.”

El-Sissi spoke shortly after a Health Ministry official said a total of 170 bodies had been pulled from the water in the five days since the boat sank.

The death toll is expected to rise, the official said, speaking on condition of anonymity because he wasn’t authorized to speak to the press.

The boat is believed to be lying at a depth of 15 meters (49 feet), about 18 kilometers (11 miles) from the Egyptian shore.

Mohammed Sultan, governor of the coastal Beheira province, told The Associated Press that a vessel was being sent by the oil company BP with specialized equipment to help lift the 80-ton fishing boat.