A Utah woman who put a microphone device on her children's diaper bag to listen to what their father was telling them has been charged with eavesdropping.

Teri Smith, 37, of Salt Lake City is being charged with three counts of wiretapping or intercepting electronic communication for trying to pick up conversations between her ex-husband and two children.

Smith and her lawyer said that she was legally allowed to do so because she believed that her children may be in danger, which is legal under state and federal law.

Teri Smith, 37, faces wiretapping charges for putting an audio recording device in her children's diaper bag when they went to their father's house

Prosecutors disagreed and said that none of the alleged sexual abuse took place.

They said that Smith put an audio recorder in her children's bag nine times in 2012, according to the Standard-Examiner.

The husband discovered the recorder and confronted his ex-wife about it, but found another recorder in a child's coat pocket several days later.

No charges have been filed against the ex-husband.

Smith filed for divorce from him in 2011 and the two have since been engaged in a lengthy custody battle.

The wiretapping charges are third-degree felonies, which carry possible jail time of five years or a fine of up to $5,000.

Smith says that the recording devices were legal because she was worried that her children were being abused by her ex-husband. Above, a stock photo of a diaper bag

Her alleged use of a diaper bag is not the first time that a parent has used children's items to spy on an ex-spouse.

A Nebraska woman named Dianna Divingnzzo was sued by her ex-husband in 2009 after putting a recording device in a teddy bear with plans to use the audio to prove her former spouse's abuse of their daughter.

She had wanted to use them during a custody trial, but destroyed the recordings the day a judge said they could not be admitted because they were obtained illegally.