Niger's parliament has adopted a law to try to stop the smuggling of migrants through its borders.

National Assembly Secretary-General Boubacar Tiemogo said Wednesday the law imposes up to 30 years in prison and steep fines for those trafficking migrants.

Justice Minister Marou Amadou said earlier that the new law gives Niger the legal means to punish those profiting from smuggling, while protecting migrants' rights. It is not intended to prohibit legal immigration, he said.

Thousands of people trying to get to Europe in hopes of a better life are being smuggled through Niger on the way to Libya. Many die crossing the deserts, or by sea. More than 10,000 people have been plucked from the Mediterranean off Libya in the last month, and 1,700 are feared dead.