ALBANY  The State Legislature took pivotal steps on Wednesday toward repealing much of what remains of the state’s 1970s-era drug laws, which have tied judges’ hands and required them to impose mandatory prison terms for many nonviolent drug offenses.

The Assembly approved legislation, 96 to 46, that would restore judges’ discretion in many lower-level drug-possession crimes that are felonies by eliminating laws that require a prosecutor’s consent before judges can send certain felons to drug treatment instead of prison.

In addition, the measure would permit about 2,000 prisoners to apply to have their sentences reduced.

The same bill was introduced on Wednesday in the Senate, where Democratic leaders vowed to quickly take it up. But the task now confronting legislative leaders and Gov. David A. Paterson is to reconcile the Assembly bill  which is considered the widest-reaching of the proposals under consideration  with the governor’s plan and the bill that Senate Democrats expect to pass after amending the Assembly bill.