ALBANY, N.Y. (AP) — New York lawmakers have voted to extend state financial aid to students brought into the country illegally as children.

The Senate passed the so-called Dream Act on Wednesday, followed quickly by the Assembly. Democrat Gov. Andrew Cuomo has said he'll sign the measure.

The bill had been blocked by Senate Republicans for years but gained new momentum when Democrats took control of the chamber last fall.

To be eligible, a student must have a New York high school diploma. The bill is expected to cost $27 million.

Democrats said it's wrong to deny educational opportunities to New York children because of where they were born.

Republicans opposed the bill, saying it's unfair to taxpayers.

California, Texas, and four other states already have similar laws.