A secret drug deal took place just before the grisly murder of AMANDA KNOX’s tragic roommate – and it could have changed the course of the sensational case had it come to light during Amanda’s trial!

Highly placed Italian insiders told The ENQUIRER that Rudy Guede – the convicted killer who implicated Amanda and her Italian boyfriend in the murder of British exchange student Meredith Kercher – met with a mystery man, a drug dealer, outside Meredith’s home on the fateful night.

But that information was squelched by overzealous prosecutors bent on prov­ing their theory that the American beauty orchestrated the bloody slaughter in a drug- and sex-fueled frenzy.

Shockingly, the bombshell evidence hid­den during their trial could have instantly cleared 24-year-old Amanda and her Ital­ian lover Raffaele Sollecito of Meredith Kercher’s brutal slaying.

“Had Rudy Guede revealed what he knew, a fourth person would have been implicated in the murder and Amanda and Raffaele never would have been con­victed in Meredith’s death,” a close source told The ENQUIRER.

Amanda – an exchange student from Seattle, Wash., dubbed “Foxy Knoxy” – and Raffaele were finally freed in early October after four years behind bars when an Italian appeals court tossed out guilty verdicts reached in December 2009.

While their release made international headlines, Guede, a drug dealer from the Ivory Coast, remains behind bars for the murder of 21-year-old Mer­edith.

Meredith was killed on Nov. 1, 2007. Her partially nude body was found on the floor of a bedroom of a home she shared with Amanda. Police said she had been raped and her throat had been cut. Prosecutors in Perugia, led by Giuliano Mignini, theorized she had died after refusing to join Amanda and her boyfriend Raffaele in an “extreme” sex game.

In court, Amanda and Raffaele claimed they were framed by the pros­ecution and denied taking part in the killing.

Guede’s DNA and fingerprints were found all over the murder scene, including on Meredith’s body. He admitted being in the house when she was killed. After his arrest, Guede initially claimed that Amanda and Raffaele were not at the murder scene. He also said that he’d never met Raffaele and barely knew Amanda.

But over a five-month period, his story changed, and he implicated the two young students.

Guede was given a 30-year jail term that was reduced to 16 years. Prosecutors never objected to the reduction, sparking continued speculation that Guede had struck a deal in return for fin­gering Amanda and Raffaele.

“Guede kept hidden what really happened the night Meredith died,” said the close source. “He never re­vealed that he met for a drug deal with a well-known local dealer in his car that was parked in Meredith’s driveway just before she returned home from visiting friends.

 “Details of the drug deal were with­held because it would have destroyed the prosecution case that Guede had arranged to meet with Amanda and Raffaele at the house for the imagi­nary ‘sex party’ with Meredith.”

The ENQUIRER has learned the identity of the mystery man, who comes from Eastern Europe, but we are withholding his name for legal reasons. We have also learned he secretly met with prosecutors a year after the killing!

“My client said he was in fear and asked me to arrange an interview with the (prosecutor),” his lawyer – who agreed to speak on the condi­tion of anonymity – told T h e ENQUIRER.

“I made the arrangements for the meet­ing and took him to the of­fice. But I never went inside. As his advocate, I did not wish to know what was going on. That might sound strange but I did not wish to become involved in something that might be wrong.”

A local reporter claimed he’s confirmed details of the mystery man’s story, and newspa­per editor Giuseppe Cas­tellini told The ENQUIRER: “The mystery man was at the house that night because Rudy sold drugs on his behalf.”

A year after the murder, the man was convicted of possession and trafficking in cocaine. He was sentenced to five and a half years in prison but has remained free and lives outside of Italy.

“Had details of the drug deal and the mystery man been known to the court, it’s likely Amanda and Raffaele may not have been falsely convicted of a crime they didn’t commit,” the close source told The ENQUIRER. “Hopefully, the real story will come out and further vindicate them.”