Bankruptcy filings in Western New York decreased 6 percent in July, continuing a pattern fueled partly by tighter available credit, a bankruptcy attorney said.

The U.S. Bankruptcy Court for the Western District of New York reported 476 new petitions were filed last month in Buffalo and Rochester, which was down from 506 a year ago. The number of cases filed in the 17-county district has dropped on a year-over-year basis for six straight months.

Through the first seven months of this year, the number of cases filed in the district was down 10.6 percent from the same period in 2012.

Bankruptcy attorney Jeffrey Freedman said the drop in filings in Western New York is in line with national trends. Part of the decline is due to a change in credit available: pre-approved credit cards are no longer widely distributed to consumers, and the days of prospective homebuyers easily obtaining mortgages for homes they can’t actually afford are over, he said.

The lack of growth in Buffalo Niagara’s population is another factor in the falling number of new cases being filed, Freedman said.

The eight-county Buffalo area of the Western District of New York accounted for 59 percent of the July filings, while the nine-county Rochester area accounted for 41 percent. In each of the past two months, Rochester’s number of new petitions rose from a year ago, but those increases were more than offset by the drop in filings in Buffalo.

Kevin Bambury, an attorney with Jeffrey Freedman Attorneys’ Rochester office, said the Rochester area is continuing to see “significant changes” in its economy, as once-dominant employers like Kodak and Bausch and Lomb downsize their operations.

Of the 283 cases filed in Buffalo in July, 218 of them, or 77 percent, were Chapter 7 cases. Under Chapter 7, debtors can liquidate their assets to pay off debts and then erase any remaining amounts owed so they can start over.

The number of new cases filed in the Western District of New York in July has fallen each year since 2010.