ST. PAUL  (AP) - Minnesota lawmakers have approved a budget deal that will end a 20-day state government shutdown as soon as Gov. Mark Dayton signs it.

The state House and Senate approved the budget during a special session, with the last vote coming early Wednesday morning after lawmakers worked through the night. The session began Tuesday afternoon.

It wasn't clear how quickly Dayton would act, but his signature would formalize an agreement that the Democrat reached with Republican legislative leaders last week.

The two sides argued bitterly over taxes and spending for months. The impasse became a crisis when government shut down July 1 because no budget was approved.

(Copyright 2011 by The Associated Press.  All Rights Reserved.)