Prosecutors on Monday dropped state charges against a woman in the 2002 abduction of Elizabeth Smart in exchange for a guilty plea related to the attempted kidnapping of Smart's cousin.

Wanda Eileen Barzee pleaded guilty but mentally ill to one count of conspiracy to commit aggravated kidnapping. The second-degree felony stems from the July 24, 2002, attempted abduction of Smart's 15-year-old cousin — 50 days after Smart was taken from her Salt Lake City home at age 14.

Sentencing in 3rd District Court is set for May 21.

SLIDESHOW: The Elizabeth Smart Saga

Click here for the charges against Mitchell and Barzee (FindLaw)

The plea helps resolve a nearly 8-year-old case that slowed when Barzee was twice deemed incompetent to stand trial. Judge Judith Atherton ordered Barzee to undergo forced treatments with anti-psychotic medications. That process began in May 2008.

Last fall, doctors at the Utah State Hospital said Barzee had responded to the treatment and was considered competent.

Atherton accepted that determination Monday but said Barzee remains mentally ill. Barzee's treatment, primarily for depression, is ongoing, said her attorney, Scott Williams.

In November, Barzee, 64, pleaded guilty to federal charges of kidnapping and unlawful transportation of a minor across state lines for Smart's abduction. Sentencing in that case is scheduled for May 19.

Barzee could face up to 30 years in state and federal prison. As part of both plea deals, she has agreed to cooperate with the government in the pending state and federal cases against her estranged husband, Brian David Mitchell.

Barzee was originally charged with six felonies in state court after her 2003 arrest. One of those was related to the cousin's attempted kidnapping.

Court papers say Barzee helped Mitchell plan to take the cousin to a mountain campsite where Smart had been tethered on a 10-foot cable since her own abduction.

Smart testified in federal court that she was taken from her bedroom at knifepoint on the night of June 5, 2002, was forced into a polygamous marriage with Mitchell, and endured repeated rapes and other abuse. She was held captive for nine months.

On Monday, Salt Lake County Assistant District Attorney Alicia Cook said she believed Smart's cousin Olivia Wright would have suffered the same fate had the kidnapping attempt been successful. But it was thwarted by clumsiness.

In statement to The Associated Press in 2003, prosecutors and Olivia's father, Steven Wright, said a thin object poked through a cut window screen knocked over a picture frame on the desk in front of the window.

The clatter woke Jessica Wright, another of Smart's cousins, and police were called. Prosecutors and family said the attempted kidnapping was not aimed not at Jessica Wright, then 18, but at Olivia, who was close to Smart and used to sleep in the bedroom where the break-in occurred.

It was Smart who led Mitchell and Barzee to the Wright home, former Salt Lake County District Attorney David Yocum said in 2003.

Mitchell also was deemed incompetent to stand trail in state court, but a judge ruled against forced medications. In federal court, a judge has yet to issue a decision after a 10-day competency hearing was held late last year.

No one from the Smart or Wright families was in court Monday.