PHOENIX — Arizona’s attorney general, Tom Horne, was not amused by the undercover investigation that Mayor Michael R. Bloomberg of New York City recently conducted at a Phoenix gun show, in which undercover detectives found two gun sellers apparently violating federal law.

Mr. Horne criticized Mr. Bloomberg for not notifying the Arizona State Police in advance of the investigation. “The fact that no such notification was made indicates this so-called sting is nothing less than a public relations stunt,” Mr. Horne said in a statement.

He said that the mayor ought to focus on what he called New York City’s “skyrocketing crime rate.”

“According to the most recent F.B.I. statistics, violent crime in New York City increased significantly in 2010 compared to data from 2009,” he said. “Robbery went up 3.9 percent, forcible rape rose 13.9 percent, aggravated assault increased 8.8 percent and murder rose 12.3 percent. Clearly, the good men and women of the New York City police department have more pressing crimes to investigate than alleged violations at a gun show 2,400 miles away.”

Aides to the mayor said that private detectives who were former law enforcement officers carried out the video investigations, not current police officers. Jason Post, a Bloomberg aide, also disputed the crime figures issued by Mr. Horne. He said that New York is the safest big city in the nation, safer than Phoenix, according to the per capita rate of major felonies tracked by the F.B.I.

As for whether New York ought to be investigating out-of-state gun shows, Mr. Post said that 90 percent of the guns recovered in crimes in New York City come from out of state.

The investigators participating in the mayor’s videotaped episode bought three guns, two of them after telling the Arizona sellers that they probably could not pass a federal background check. Such checks are not required for private sales, but private sellers are forbidden from selling to people they reasonably suspect could not pass a federal background check.

In a third purchase, the undercover investigators bought a Glock pistol like the one used in the Jan. 8 Tucson shooting. That purchase was legal, the mayor’s aides said, but was intended to show how easy it was to acquire such a gun with no background check.

The operators of the Crossroads of the West gun show, held on Jan. 23 in Phoenix, was also angry at the undercover buys. “These forays into America’s heartland committing blatant acts to entrap otherwise innocent gun owners is an unlawful scheme that is created by Bloomberg’s task force,” the company said in a statement.

Gov. Jan Brewer shrugged off Mr. Bloomberg’s investigation to reporters on Monday. “We believe our laws are fair and just in the state of Arizona,” she said.