HARTFORD, Conn. — A felon with a long rap sheet testified Tuesday that a woman paid him $5,000 to kill her ex-husband in 2012 during a child custody court case that police said had millions of dollars at stake.

The testimony in Hartford Superior Court came on the first day of the trial of 39-year-old Tiffany Stevens, formerly of Bloomfield, who has pleaded not guilty to attempted murder.

The felon, John McDaid of Granville, Massachusetts, also testified that Stevens threatened to have him and his children killed if he didn’t follow through on the murder-for-hire.

McDaid, who said he had a criminal record dating back to the 1970s including 22 felony convictions, said he didn’t follow through on the plan and instead told Stevens’ ex-husband, Eric, who reported it to police.

McDaid said he spent the $5,000 on a washer, dryer, clothes for his children and other items while leading Tiffany Stevens to believe he was going to carry out the plot.

“Find somebody. I want him killed,” McDaid said Tiffany Stevens told him, adding, “I honestly almost didn’t think it was real.”

McDaid said Stevens asked him “incessantly” over several months when her ex-husband would be killed and accused him of abusing her.

In April 2012, while McDaid was working as a maintenance man for a wealthy Simsbury couple, he said Tiffany Stevens, who knew the couple, slapped an envelope containing $5,000 across his chest and said, “Get it done.”

McDaid also testified he used a computer audio program to secretly record Stevens talking about the murder-for-hire plot.

Her lawyers, Hubert Santos and Trent LaLima, are trying to prevent the purported audiotape of her and McDaid from being used as evidence during the trial. On Tuesday, they raised the possibility that the recording could have been tampered with.

Judge Edward J. Mullarkey has yet to rule on their motion.

The trial is scheduled to continue Wednesday afternoon and last until at least next week.

Simsbury police Sgt. Gregory Samselski testified that Eric Stevens called police in July 2012 to tell them about his ex-wife’s plot and to play the audio recording for them.

Samselski said he learned later that whoever won custody of the Stevenses’ daughter would control a trust fund said to be worth $50 million.

Tiffany Stevens, who is free on $1 million bail, has custody of her daughter, despite the attempted murder case.

Eric Stevens is seeking custody of the girl in family court; he says he doesn’t know where his daughter is.

Tiffany Stevens had her long black hair in a ponytail and wore a black blazer and black slacks Tuesday. She arrived at court holding hands with her father, Edward Khalily, a principal of WEGO Chemical & Mineral Co. in Great Neck, New York.

She had no comment.