Johnny Vega rarely carried his 9-mm pistol when he wasn't on duty. He wishes he had that day.

The narcotics cop was chatting with a friend on a park bench, the Andean sun burning the dawn's chill off this highlands town nearly 10,000 feet (2,900 meters) above sea level.

On that morning of Aug. 20, 2014, Vega had dropped his son Juan at nursery school and then walked to Talavera's main square. He noticed a tall young man strolling by and wondered if he knew him.

Vega was a rarity in this nation where cops, courts and congress are badly compromised by corruption. An earnest provincial narcotics officer, he had made a career of actually doing what he was trained for: locking up criminals. Defying death threats from narcos, he led a hand-picked team of trusted officers who consistently scored trafficker arrests and record drug seizures even as Peru became the world's No. 1 cocaine producer. In a country where police are as likely to take bribes as to make arrests, Vega was a hero. Three times, he had been named police officer of the year.

Vega was deep in conversation when the young man walked by again, stopped and leveled a silencer-equipped Bersa at the cop's head.

"What are you doing, dammit!" Vega shouted, jumping to his feet. The bullet ripped into him just below his solar plexus. Without hesitating, he dashed for a nearby taxi stand, leaning forward and zig-zagging to make himself a smaller target.

The hit man kept firing but did not give chase. A stray bullet pierced the thigh of a vendor.

"Help! I'm a cop. I've been shot!" Vega shouted. A woman passenger pulled the bleeding man into her cab, which sped to a hospital 15 minutes away.

In the operating room, surgeons opened him up, pulled out his intestines and laid them out on the table to assess the damage and sew the pierced organs back together. Part of his colon was lost.

The local narcotics prosecutor arranged for him to be flown to Lima the next morning in a plane owned by the U.S. Drug Enforcement Administration. As the ambulance bounced up the rutted road to the airport, Vega groaned. His wife, a schoolteacher, clutched his hand.

Lima-based drug agents quickly arrested the alleged hit man while Vega was in the operating theater. The motive? Payback for targeting a drug gang. Police said one of its principals, Armando "El Loco" Cardenas, hired the shooter, provided the gun and promised him and an accomplice $10,000 each to kill Vega. El Loco was arrested, too.

As news of the shooting spread, accolades for the hero cop poured in.

U.S. Ambassador Brian Nichols sent a letter commending Vega, and then-Interior Minister Daniel Urresti appeared before the press with the arrested men. Vega's valor would be rewarded, he vowed.

"We are going to promote him and give him all he needs to recover and continue with his work," Urresti said.

Drug war analysts were impressed by Vega. But would Peruvian authorities make good on their promise to this officer from Peru's poorly paid, notoriously neglected police force?

From his hospital bed, Vega believed the promise would be kept.

He would later conclude that he would have been better off if he had simply had his gun that August morning.

___

"WATCH OUT FOR YOUR CUTE LITTLE CHILDREN."

Nearly 70 percent of Peru's cocaine originates in the Apurimac, Ene and Mantaro river valley, a two- to three-day hike from Andahuaylas, the provincial capital 15 minutes from Talavera.

What is ultimately refined into the crystalline powder snorted in distant lands arrives as semi-refined coca paste carried out of the valley by young backpackers, or "mochileros." They call the paste "queso," or cheese, for its pungent odor. It is typically stashed in bricks amid groves of eucalyptus and acacia until traffickers have enough to dispatch it by road, usually to Bolivia.

The youngest of nine, Johnny Vega was sent by his father to finish high school in the state capital in 1986. The next year, his father, the village leader, was seized by Shining Path rebels and disappeared. Johnny joined the army, and searched for his father's remains. Not until a decade later, after the insurgents were vanquished, were they found.

By then, Johnny was a cop and Andahuaylas was becoming a major drug-trafficking corridor.

"Andahuaylas is like a sieve. The drugs go in and out every which way," said Vega, who is tall with a square Andean nose.

Provincial police took bribes to let the drugs go through. At least one apparent exception was the regional police chief who in 2009 tapped Vega to form a 15-man squad focused on narcotics.

Vega had proven himself years earlier. At a 2002 stakeout, cocaine backpackers hurled a grenade at him that peppered his chest and knee with shrapnel.

Vega's new squad wasn't equipped for its mission. So he borrowed vehicles and flak vests, scrounged handcuffs and flashlights. Then he did something unheard of: He created a night shift so the squad could work around-the-clock, since the traffickers operated mostly under the cover of darkness.

His agents seized more than a half ton of coca paste the first three years, making more than 60 arrests. No other provincial unit did such work, narcotics prosecutor Elvira Aldana said. "He was the only cop sticking his neck out," she said.

The death threats started coming by phone and text message in 2010, the first time Vega was named Andahuaylas' policeman of the year.

"Just as you have your snitches, so do we," said one. "Watch out for your cute little children." Vega and his wife asked to be transferred, but nothing happened.

Nevertheless, Vega did not ease up.

In early 2014, elite agents of the Lima-based narcotics police set out to take down Andahuaylas' biggest drug clans, an ambitious undercover operation. Vega was the only local officer they trusted.

They seized nearly 400 kilograms of coca paste, more than a third of it hidden in a compartment under sacks of potatoes on a tractor-trailer truck. Police said most of the drug was traced back to alleged capo Dimas Urrutia, who they arrested the next month.

Four days later, Vega was shot.

___

A DEAD CAT

In September 2014, after his nearly monthlong hospital stay, Vega got some good news. He would be promoted to the equivalent of master sergeant and transferred to Lima, where he would have 24 months to recover — or face mandatory retirement.

Vega figured he merited special treatment, but no stipend, lodging or transport were offered. He would need to manage alone on his $1,000 monthly salary. His wife, Yesi, had returned home to Talavera — a 20-hour bus ride away — to care for their two boys and resume her teaching job. She was four months pregnant.

His new boss wrote the deputy education minister asking that Vega's wife also be reassigned to Lima due to the "emergency situation." But nothing was done.

Vega moved in with his 84-year-old mother in the dusty hillside Lima slum of San Juan de Miraflores. His wound, initially infected, required going to the hospital to be cleaned, his cab rides costing $10 each way. He wore a colostomy bag to collect his waste while awaiting surgery.

With no one to attend to him, Vega cooked, cleaned and washed for himself. He developed a hernia that grew into a four-inch bulge in the center of his gut, and wears an elastic girdle.

It took 10 months before his colon was reattached, as Vega coped with the usual shortcomings of the police health care system — long waits for tests and consultations, a shortage of doctors and modern equipment. He paid out of pocket for some blood tests and medicines. Only half was reimbursed.

With her husband stuck in Lima, Yesi asked the local police chief to send patrol cars past her house as a protective measure, since strange vehicles were crawling by at odd hours.

Late one night, someone shattered her front window and tossed in a dead cat, its legs hog-tied.

"It had papers jammed in its mouth as if to say, 'This is how you will all die,'" Yesi recalled, her voice cracking. "I never told my husband. He wasn't well."

Yesi personally appealed to the national police director for protection. Again, nothing happened.

The prosecutor in the case, Aldana, got different treatment. Wiretaps revealed that she, too, had been targeted for assassination. She was assigned four bodyguards then transferred out.

___

A BROKEN SYSTEM, A BROKEN HERO

In November, Johnny was back home in Talavera gathering strength for his next surgery. He stayed mostly behind locked doors. When he went out, he tucked his 9-mm Baikal pistol into a pouch strapped across his chest.

"Do you have your gun?" 6-year-old Juan would fearfully ask his father.

Talavera is a small town. The three reputed capos linked to her husband's shooting were all in Lima prisons, but Yesi was regularly seeing their wives about town. One had a daughter in Juan's nursery school class.

The lure of cocaine cash is powerful in this valley where the only other significant income source is farming. After Vega was shot, the cocaine trade roared back. Not a single kilo of coca paste was seized last year, and the unit Vega commanded is down to six men.

The local cops are mostly inert, if not in cahoots with narcos, prosecutors and Lima-based drug police say. About two dozen are under investigation for money-laundering, narcotics prosecutor Lincoln Fuentes said. They own property or vehicles far beyond their means.

Recently, a police captain was arrested on trafficking charges near the Bolivian border after posting a photo on Facebook showing him with a sheaf of $100 bills between his teeth. "Weekend spending money," the caption read.

Two weeks ago, when Vega complained about lingering pain, doctors ordered a colonoscopy. It found a 10-centimeter (4-inch) length of surgical thread loose inside his colon. His doctors lack the endoscopic scissors to snip it out and they don't agree on whether the thread should be removed before surgery to mend his abdominal hernia.

Vega, 46, has begun to reconcile himself to the idea he may not heal in time to avoid forced retirement in August.

At a doctor's visit last month, he joked about heading down to the cocaine valley to chase narcos and recalled the pleasures of hiking with a heavy pack, something his body can no longer bear.

Yesi is heartbroken to see her husband so diminished — still unwell and far from his family.

"We are simply demanding what my husband by rights should be getting," Yesi said.

"In his time, he was the news of the day. But now he's been forgotten."

___

Frank Bajak is on Twitter: http://twitter.com/fbajak . His work can be found at http://bigstory.ap.org/author/frank-bajak .