ST. PAUL (AP) — Minnesota's Legislature has finished passing a $46 billion budget in a special session.

It took three extra days and some horse-trading to win crucial Democratic votes. But the Republican-controlled Legislature passed its final budget bills early Friday morning.

The overtime began Tuesday morning after lawmakers passed the constitutionally mandated deadline to finish a budget by midnight on Monday. But lawmakers made little progress throughout the week as Gov. Mark Dayton and Republicans got hung up on final details.

Lawmakers passed five remaining budget bills Thursday and into Friday morning. That included a state government financing bill that removed a change to how union contracts are ratified in order to win necessary Democratic votes in the Senate.

Dayton will have several days to decide whether to sign the budget.