State laws that prevent Walmart and other national chain stores in Texas from selling liquor are unconstitutional, a federal judge has ruled. But the state's powerful package liquor stores association said Wednesday that it would appeal the decision.

A U.S. district judge in Austin ruled late Tuesday in favor of Walmart and against the Texas Alcoholic Beverage Commission on two laws that since Prohibition have dictated who can sell liquor in the state.

Judge Robert Pitman ruled that one of the laws, which prohibits publicly traded companies from selling liquor in Texas, was unconstitutional.

"Texas is the only state that bars public corporations from selling liquor solely because of their status as public corporations," Pitman wrote in his 50-page opinion, which goes through the issues with extraordinary care.

The trial lasted a week last June. Pitman stayed his decision so no retailer could move ahead with plans until the appeal process was completed. That could take a year.

Another longstanding rule, which has allowed family-owned liquor businesses to grow without facing limits on the number of package liquor store permits they could hold, was also declared unconstitutional.

The family-owned businesses benefited from an exception to the rule that restricts other retailers to five permits in the state. In a family-owned business, the law says, each child, sibling or parent can have five permits. The reasons for the law years ago had to do with promoting small businesses and enabling estate planning.

Pitman said that rationale "borders on nonsensical."

"We applaud Judge Pitman's order striking down Texas laws that have prevented us from fully serving our customers," said Walmart spokeswoman Anne Hatfield.

Walmart sells beer and wine in 668 of its stores in Texas, including Sam's Clubs. Texas is Walmart's biggest state — representing more than 10 percent of its sales. Adding liquor to its shelves could generate a meaningful increases in its business.

But the shelves of tequila, rum and vodka won't be next to the tennis shoes or tortillas.

Walmart has wanted to open liquor stores adjacent to some of its Texas stores and with separate entrances as required by state law, but under existing laws, it couldn't receive a permit.

Houston-based Spec's, the state's largest liquor store chain, with 158 locations, is among the companies in Texas that has benefited from the laws. Last year, the Texas Package Stores Association was allowed to join the lawsuit that Walmart filed against the Texas Alcoholic Beverage Commission in 2015. Now the association can appeal Pitman's decision to the 5th U.S. Circuit Court of Appeals.

"The Texas Package Stores Association is disappointed in the trial court's decision to overturn decades of Texas law regulating the sale of liquor in Texas," said Lisa Rydman, a third-generation family member operating Spec's.

"We will appeal the trial court's decision and continue to fight for family-owned liquor store owners against the world's largest corporate entities that seek to inflate their profits by upending sensible state laws that protect both consumers and small businesses," Rydman said in an emailed response. "The Texas Legislature put a system in place to ensure safe access to alcoholic beverages in Texas, and that system has worked for over 80 years."

Besides being the only state that excludes publicly owned companies, Texas is also the only state that gave unlimited permits to some and limited other retailers to five permits. Walmart challenged both rules when it filed its lawsuit against the state, saying those provisions of the Texas Alcoholic Beverage Code violated the Equal Protection and Dormant Commerce clauses of the U.S. Constitution.

"Walmart filed suit because these laws are unfair and hurt our customers," Hatfield said. "We are grateful for Judge Pitman's thoughtful opinion, finding that these laws violate the U.S. Constitution."

Alcoholic beverage laws at the local level have been changing in the past five years as more Texas cities have voted in favor of liquor sales. Maryland-based Total Wine & More has funded some of those efforts. The retailer didn't immediately respond to a request for comment on Tuesday's court ruling. Several cities have also voted to turn dry areas wet for beer and wine sales.

Grocery stores and convenience stores throughout North Texas have added beer and wine shelves and coolers. The new competition for beer and wine sales has chipped away at package liquor store sales.

At the same time, liquor is gaining on other alcoholic beverages.

U.S. sales of spirits hit records in 2017 and continued to gain market share vs. beer, according to a report in February from the Distilled Spirits Council. Suppliers of liquor reported a $1 billion, or 4 percent, sales increase last year for a total of $26.2 billion. Volumes rose 2.6 percent to 226 million cases, up 5.8 million cases from the prior year.

Twitter: @MariaHalkias