PHOENIX — The state’s top prosecutor says Gov. Doug Ducey is acting illegally in telling police to ignore violations of certain state liquor laws by restaurants.

In a new court filing, Attorney General Mark Brnovich said he disagrees with the bar owners suing the governor that the laws granting him emergency powers are an unconstitutional delegation of legislative powers.

“When the pandemic hit, the governor was well within his authority to declare an emergency and close down all non-essential businesses in an even-handed manner until health officials could better determine the nature of this novel virus,’’ he said.

But Brnovich said that’s not what happened here, with the governor deciding not only that restaurants can open but bars cannot — at least not the way they were designed — but directing state liquor agents and police to turn a blind eye to bars selling alcoholic beverage to go, something specifically prohibited by state law.

And then there’s the fact that Ducey’s emergency has been in place since March.

“It is clear that we are now in a world where the governor is picking winners and losers regarding the economic recovery from the emergency, not reacting to the emergency itself,’’ Solicitor General Beau Roysden wrote for Brnovich, who is his boss. “But that is a legislative function, and not within the proper scope of the emergency powers that are conferred to address the exigencies of emergencies when they first arise.’’

So Brnovich wants Maricopa County Superior Court Judge Pamela Gates, who is handling the case, to interpret the emergency statute being cited by the governor as justifying his actions to be solely “conferring authority to carry out emergency functions and closely related activities, not as an indefinite grant of legislative authority.’’

And Brnovich said if Ducey believes restaurants need economic relief — his stated reason for giving them an exception from the laws that now bar them from selling alcohol to go — there is an option.

“The governor can call the legislature into special session to address through legislation the secondary economic effects of the COVID-19 pandemic that his current executive order attempts to address through executive fiat,’’ he said.

In a prepared response, gubernatorial press aide Patrick Ptak said his boss believes that his actions are legal. But he also said Ducey had good reasons for the decisions he made.

“The pandemic has placed an enormous burden on all Arizonans, both economically and related to public health,’’ Ptak said. “The governor’s actions have allowed establishments to focus on public health while continuing to maintain operations safely and responsibly.’’

But the governor’s own attorney conceded last month that his client was, in fact, making an economic decision in having law enforcement ignore violations of liquor laws by restaurants.

Brett Johnson, in his own legal filing, argued that giving restaurants the “privilege’’ to sell beer, wine and liquor out the door “qualifies as a recovery and response activity because it aids restaurants.’’ He said that is because they were previously closed to in-house dining.

Restaurants have since been allowed to serve patrons. But Johnson said the restaurants still need the financial help because they remain “subject to capacity restrictions.’’

The gubernatorial edict at issue specifically directs that agents of the Department of Liquor Licenses and Control “shall not nforce the provisions of the Series 12 (restaurant) liquor license that prohibit the sale by restaurants of beer, wine and spirituous liquor off premises.’’ Ducey’s order also keeps police from enforcing those laws.

Ilan Wurman, representing more than 100 bar owners, charges that isn’t fair.

“Giving the restaurants the off-sale privilege and letting restaurants stay open, all while closing down bars, seems to be a clear act of economic favoritism,’’ he charges.

Brnovich, in his filing, agrees that Ducey’s order giving special privileges to restaurants amounts to “discriminating in other respects against similarly situated bars.’’

But he said the broader question is the scope and duration of the authority that Ducey claims he has under statutes granting him powers to act in cases of emergency.

“There are not set criteria for ending this emergency, confirming that — seven months into it — the governor has claimed for himself the indefinite power to act legislatively,’’ Brnovich said.

He said if the law is as broad as the governor claims, it clearly is an unconstitutional delegation by the legislature of its powers.

But rather than challenge the statutes, Brnovich told Gates there’s an easier way to resolve the dispute.

“The court should conclude as a matter of statutory interpretation that (the emergency law) provides a much more temporally constrained power that must be exercised even-handedly to address the exigencies of the emergency,’’ he said. And once Gates adopts that construction of the law, Brnovich said, she should rule that Ducey’s directive to allow restaurants to violate the liquor law exceeds his authority.

This isn’t the attorney general’s first public disagreement with the governor over the scope of his emergency powers. In July, Brnovich told a federal judge there may be legitimate claims that Ducey exceeded his authority in closing certain business.

That case involved claims by Xponential Fitness against the governor that he had no legal basis to re-close gyms and fitness centers in June after there was a new spike in COVID-19 cases.

Brnovich took no sides in that dispute. But he told the federal judge handling the case that the claims against Ducey “raise serious issues of first impression involving executive authority in an emergency.’’ And he said these “deserve close and careful consideration by the court.’’

That case ended up being dismissed after that fitness center and others were allowed to reopen, albeit with limited capacity.