(CNN) -- A sheriff's deputy in central Arizona was shot Friday afternoon by a suspected drug trafficker, authorities said.
The Pinal County deputy, who was not immediately identified, contacted authorities after being wounded in the desert, saying he had been shot by an illegal immigrant with an AK-47, said Lt. Tammy Villar, a sheriff's spokeswoman.
The deputy radioed that he had encountered five men, some wielding long guns and handguns, and said they were carrying a large amount of marijuana.
At one point the deputy lost radio contact with authorities, leading to a search by foot and by air for him and the shooter, according to CNN affiliate KNXV. Video from the scene shows that the deputy was located while sitting in desert brush, surrounded by cactus. He was able to walk to a helicopter that airlifted him to a hospital.
A spokeswoman at Casa Grande Regional Medical Center confirmed that the deputy was being treated there Friday evening. He was in good condition with stable vital signs, conscious and comfortable, she said.
The deputy was shot in the left abdomen and suffered a superficial wound, law enforcement sources said.
The search for the shooter continued into the evening.
The shooting comes amid a national debate over Arizona's tough new immigration law, which allows police to demand proof of legal residency. Arizona lawmakers say the law is needed because the federal government has failed to enforce border security with Mexico, allowing more than 450,000 illegal immigrants to move into the state.
Pinal County is between Phoenix and Tucson and has been described as a key transit point for illegal immigrants and drug traffickers. Sheriff Paul Babeu said an estimated 80 percent of illegal immigrants pass through his county along the way to other locations.
Earlier this week, a CNN crew spent 12 hours on patrol with Pinal County deputies. In that time, the deputies captured more than 50 suspected illegal immigrants and about 2,000 pounds of marijuana.
Deputies in the department routinely patrol for illegal immigrants and smugglers, and it is not uncommon for them to be in the field alone, officials said. It was not immediately clear what led the deputy to engage with the shooter Friday.
The shooting is sure to heat up the debate around the new Arizona law. Critics say the law is unconstitutional and will lead to racial profiling, which is illegal. But Republican Arizona Gov. Jan Brewer and others who support the law say it does not involve profiling or other illegal acts and will cut down on illegal immigration.
"Frankly this is just a very horrible story, but we should not generalize," Alfonso Aguilar, former chief of the U.S. Citizenship Office, told CNN's Rick Sanchez when news of Friday's shooting broke. "We should focus on the criminality of the drug traffickers ... not scapegoat undocumented immigrants who do not pose any threat to society."
Brewer on Friday signed a bill that makes changes to the immigration law, saying the changes will ease concerns about racial profiling.
The law, which will go into effect in 90 days, has already drawn at least two lawsuits and condemnation from the Mexican government and other Latin American nations. Prominent entertainers, including Shakira and Linda Ronstadt, also have spoken against the law. Some critics are calling for a boycott of Arizona, urging tourists to stay away and that no one do business with companies in the state.
CNN's Casey Wian contributed to this report.