Closing a mortgage in Minnesota is getting less expensive. On average it costs $3,559 to close a loan in Minnesota, down 15 percent from last year and well below the national average of $3,754.

That makes Minnesota closing costs the 15th lowest in the nation, compared with 17th highest last year. That's according to a new survey by Bankrate.com, which attributes the decline in Minnesota and across the country to new rules that require lenders to estimate third-party fees within 10 percent of the final cost. That makes for a more competitive playing field.

"The main lesson of this survey for consumers is to shop around the at least three different estimates," said Geg McBride, Bankrate.com's senior financial analyst. "While no one is going to move to a new state just because closing costs are lower, it's important for people to realize that there is variation even within their neighborhood."

Who had the most expensive? New York, followed by Texas, Pennsylvania, Florida and Oklahoma. Missouri was the least expensive state with an average cost of $3,006. To see the complete survey, click here.