Mexico's Senate has approved a bill offering illegal immigrants greater rights, while stripping out controversial proposals that would have toughened enforcement measures.

The legislation would guarantee education, health care and more equal treatment for migrants in Mexico. It still must be approved by the lower house.

The proposal had drawn protests because a now-deleted clause would have allowed federal police to detain migrants, a task currently limited to immigration agents.

Another clause deleted in Thursday's vote would have imposed fines on those who hire undocumented migrants.

Hundreds of thousands of migrants from Central America cross Mexico trying to reach the United States. They often face abuse during the journey.