Democrats pushed the measure as an alternative to a proposal by Republican Gov. Susana Martinez to stop New Mexico from granting licenses to illegal immigrants.
The Senate approved the bill late Monday night on a 27-15 vote. One Democrat, Senator John Arthur Smith of Deming, joined Republicans in opposing the measure.
The proposal will continue to grant licenses to illegal immigrants, but require fingerprinting of applicants and limit the licenses to one year. The state also can cancel previously issued licenses to foreign nationals if they no longer live in New Mexico.
The bill goes to the House, which has rejected a similar proposal. The governor also opposes the Senate-passed measure.