The French judge ruled there wasn't enough proof the men were aware that self-described escort Zahia Dehar, now 21, was a minor at the time. The case has been hanging over the players since July 2010, when a French judge issued preliminary charges against them.
Neither player was president as the criminal court announced the verdicts, but the relief and emotion got to Ribery's lawyer, Carlo Alberto Brusa, who was in tears as he phoned the France star to tell him he'd been cleared of all charges.
"When you experience moments like that you get goose bumps, as he told me himself," Brusa told The Associated Press when asked how Ribery felt upon hearing the news. "He has an extraordinary character, and he's someone I respect a lot. I think it's a victory, a victory for justice."
The two footballers had faced up to three years in prison if found guilty.
Dehar contends Ribery flew her to Munich as a birthday present to himself in 2009 when she was under 18. She says she lied to the players and told them she was an adult. Dehar was also not present at the trial.
Although Ribery has admitted to having sex with Dehar, he claims he did not pay her and that he did not know she was a prostitute or a minor at the time.
"We did a lot of work, serious work analyzing the file to establish the fact that there was no proof (that Ribery knew she was underage)," Brusa told the AP.
Prostitution is legal in France, but prostitutes must be over 18.
Benzema's lawyer Sylvain Cormier said he "could feel all the weight coming off, it was morally very trying."
Cormier called the verdict "the end of a nightmare" for Benzema. "It was very painful for him. He's a strong person, he really ipressed me. Four years is a very long time."
Benzema has denied all the allegations. The 26-year-old Benzema is alleged to have paid 500 euros ($678) to have sex with Dehar in May 2008, the night he won the French player of the year award playing for his former club, Lyon. Dehar was 16 at the time.
Ribery had the best season of his career in 2012-13, helping Bayern win the Bundesliga, the German Cup and Champions League. He finished third in the recent Ballon d'Or vote behind Lionel Messi and Cristiano Ronaldo.
"Playing football with that weighing on you is not easy and for me it's the sign of a great champion," Brusa said. "He showed in 2013 that he's a fantastic player."
Benzema has passed the 100-goal mark for Madrid since joining the Spanish giant from Lyon in 2009.
The criminal court trial had initially been set for last June but was adjourned for procedural reasons. It resumed last week.
Ribery is alleged to have had sex with Dehar three times — including at the home of Kamel Ramdani, 39, one of several people who were on trial after a probe into a suspected network of prostitutes operating out of a nightclub called "Zaman Cafe" on Paris' Champs-Elysees.
The establishment was run by Georges Farhat, 30, who employed his younger brother, Elie Farhat, 26.
Both were present to hear their verdicts.
Georges was sentenced to 18 months in prison, nine of those suspended, and fined 20,000 euros ($27,150). His brother was handed a one-year prison sentence, with six months suspended and fined 5,000 euros ($6,800). Ramdani was sentenced to five months in jail and fined 5,000 euros ($6,800).