State workers rally outside the Minnesota State Capitol in St. Paul, Minn., on June 30, 2011. (Carlos Gonzalez/Minneapolis Star Tribune)

It may be the first time in 17 years for the federal government, but states are no strangers to government shutdowns.

Take Minnesota. For 20 days in July 2011, the Minnesota state government shut down, according to a state report. Nearly 200,000 staff hours were redirected from normal duties to preparation for and recovery from the shutdown. And more than a million pieces of correspondence were sent out at a cost of $552,000.

The fiscal effects of the shutdown were in dispute. While the shutdown cost the government at least $60 million in lost revenues and additional costs, the state also saved $65 million in compensation it didn’t have to hand out, according to the report. Importantly, though, it didn’t count lost productivity or the indirect impact of the shutdown. And the state subsequently paid millions to settle claims with contractors over lost work.

The 2011 episode came only a few years after what the Associated Press reported was Minnesota’s first-ever government shutdown caused by a budget impasse. A fight between then-Gov. Tim Pawlenty (R) and Senate Democrats over school and health-care spending led some state agencies and services to shutdown for more than a week in the summer of 2005, according to the AP.

A year later, New Jersey’s government shut down for the first time in its history, according to contemporary reports. Casinos closed and the state lottery stopped selling tickets during the six-day shutdown in the summer of 2006.

After yet another year passed, another state suffered a shutdown. In summer 2007, Pennsylvania’s government partially shutdown in what the governor’s spokesman at the time told the New York Times was the first to involve state workers in that state’s history. A one-day furlough of about 24,000 people led to $3.5 million in lost wages, the Times reported.

And if the federal government shuts down tonight, it could affect many of the more than 800,000 civilian federal workers spread among the states who have seen declining income this year.