(STMW) — An Uber driver’s secret recording of his conversation with a passenger prompted Cook County prosecutors Monday to drop rape and kidnapping charges against him, his attorney told the Chicago Sun-Times.

Maxime Fohounhedo, 30, was charged in December in the Nov. 16 sexual assault of a female passenger. Fohounhedo was expected to be released from the Cook County Jail later on Monday. He has spent the last four months behind bars.

“Fortunately Max can live the rest of his life without this stain on his name,” said his attorney, Shady Yassin.

According to police, the 22-year-old woman said she was intoxicated and fell asleep in Fohounhedo’s car after he picked her up for a ride home.

She said she went in and out of consciousness, eventually waking up on his couch in his apartment to find him having sex with her. Then he helped her to the car and drove her home, the woman told police.

But Yassin said the woman had made a pass at his client when she first stepped into his car.

“They went back to his place. Whatever happened there did not arise to anything criminal,” Yassin said.

Yassin said his client recorded his nine-minute conversation with the woman on his cell phone as he drove her home.

“He had a gut feeling he needed to protect himself,” Yassin said. “She was having a friendly conversation with him and talking about her boyfriend and her work and gave him a hug in the end.”

Fohounhedo helped the passenger out of his car and she said “thank you so much,” according to Yassin.

“Certainly you are not buddy-buddy with a rapist,” he said.

When Fohounhedo told prosecutors about the recording, they asked him to turn over his phone and they authenticated it, Yassin said.

“They acted fast,” he said.

Yassin said he doesn’t know whether the woman will face charges for falsely accusing Fohounhedo.

“I know it wasn’t right what she did,” he said. “My client was the real victim. He had to spent four months behind bars for whatever her motivation was — her own embarrassment, or whatever.”

Fohounhedo doesn’t plan to work with Uber again, Yassin said.

“He does not have any ill will against them,” Yassin said of Uber. “But nobody gave him a chance and everybody immediately thought he was guilty.”

Uber — an increasingly successful ride-sharing service — has come under criticism in recent months for lax background checks on drivers. Fohounhedo only had a temporary Illinois visitor’s driver’s license and supposedly violated Uber’s rules when he picked up customers using his wife’s Uber account, authorities said.

After Fohounhedo was arrested, an Uber spokeswoman said the company would refer his use of his wife’s account to police. Uber stressed that drivers are regularly audited and that the company continually checks riders’ comments.