A New Hampshire federal judge on Monday struck down a Justice Department opinion that threatened the online gambling industry, just a week before internet-based wagering was set to enter a period of heightened legal peril.

In a 60-page opinion, Judge Paul Barbadoro of the U.S. District Court for the District of New Hampshire rejected the Justice Department’s abrupt abandonment last year of a legal opinion that had paved the way for the growth of online gambling.