Federal prosecutors have dismissed a felony drug indictment against a Cowlitz County man and have exposed an audacious undercover informant who had framed the man right beneath the noses of drug agents.

Tina Rivard, 40, pleaded guilty Friday in U.S. District Court in Tacoma to charges of obstructing justice and conspiracy to obstruct a criminal investigation after she was able to fool agents of the Cowlitz-Wahkiakum Narcotics Task Force into believing she’d set up meetings and bought oxycodone — a powerful narcotic painkiller — from the 21-year-old man, whom she already knew.

She faces up to 20 years in prison — the same amount of time the man she had framed could have served, according to court documents.

Prosecutors say Rivard was able to undermine so-called “controlled buys” that were set up and monitored by task-force detectives.

“It was clever,” assistant U.S. attorney Ron Friedman said Sunday. “It took a lot of audacity.”

Rivard, according to court documents, was first arrested in May for forging prescriptions for narcotics. Agents offered her a deal — leniency in exchange for her cooperation in building cases against prescription-drug dealers in the community. She was never charged with the forgery.

Rivard helped in one case, Friedman said. Then she identified the 21-year-old Kelso man — a former standout high-school athlete with no criminal history — as a source of illegal oxycodone pills.

In building their case, agents would punch the suspect’s telephone number into Rivard’s cellphone, and then hand it to her to complete the call. Instead, Rivard would secretly speed-dial another man.

Court documents said Rivard already had told that man she was a police informant and he had agreed to pose as the target in these phone calls, making incriminating statements and setting up drug deals while agents listened.

In one instance, the documents say, Rivard went to the 21-year-old’s home with $4,000 in cash given to her by agents to purchase 100 oxycodone tablets. After she arrived at the man’s house and was out of sight of detectives, the other man showed up and went inside, according to the documents.

Rivard exited the home with the drugs, and told police she’d bought them from the 21-year-old man, the court documents say.

Agents were suspicious that another person had gone into the house, the documents say, but Rivard was able to allay their concerns by having them monitor another phone call to the “suspect.”

Again, court papers say, the agent dialed the number — and again Rivard secretly phoned the other man, who posed as the suspect and offered an innocent explanation for the incident.

Based on that transaction and the phone calls, the task force in August obtained a five-count felony indictment against the 21-year-old man.

Rivard eventually admitted it was the other man who had brought the drugs to the suspect’s house and given them to her, according to court documents.

The felony indictment against the Kelso man was dismissed last month.

He pleaded guilty to a misdemeanor drug-possession charge, because he had four narcotic pills in his pocket when he was arrested.

The impostor has not been charged in connection with the case. Friedman would say only that the investigation is continuing.

“It is a very useful example for the classroom of law enforcement,” Friedman said. “The lesson is that is there is room for misconduct, it will happen.”