Saifullah Khan grew up in a refugee camp in Afghanistan. In something of an American dream, he won a full scholarship to Yale University, where he studied neuroscience. Then, in November 2015, just one semester short of getting his degree, he was accused of raping a classmate.

Khan was arrested and charged; he was also suspended from Yale and evicted from the dorm where he had been living.

After more than two years of delays, the case finally went to trial, and last month Khan was acquitted. Yet he still faces possible deportation to his war-ravaged home country.

Had Khan been tried on any other charge, his plight as a foreign-born Muslim man, found not guilty but still in jeopardy, would no doubt be a progressive cause célèbre, especially given that the case against him was marred by police improprieties and overtones of racial and religious prejudice. But because his case abutted against a liberal obsession — campus rape — progressive opinion has been on the side of the prosecution, and the outrage has been directed at the defense.

Khan’s case raises many questions about changing moral and legal norms surrounding sexual conduct, as well as about media bias. But it’s also a tale of human generosity transcending cultural and religious barriers. Khan’s accuser is Jewish. And yet, one of the biggest sources of support for Khan, an embattled Muslim immigrant, has been the local Jewish community. (Khan declined to comment for this article.)

During his time at Yale, Khan was involved with Shabtai, a Jewish leadership society, which he once said was the only place on campus where he always felt welcome. According to a Jewish friend of Khan’s who recently graduated from Yale (and who asked to remain anonymous), Khan spent a large portion of his time staying with Jewish families following his arrest and suspension.

That part, at least, makes this a tale of hope.

*

The mainstream media narrative surrounding the Khan case told the tale of a victim of a campus sexual assault brutally revictimized in the courtroom, where her alcohol intake, her sexy Halloween outfit, and her flirty text messages to the defendant were used to discredit her. A Time headline summed it up well: “A Yale Student Accused Her Classmate of Rape. His Lawyers Asked What She Was Wearing and How Much She Drank.” Victims’ advocates said the case was a survivor’s “worst victim-blaming nightmare.”

On a similar note, writing in The Guardian, feminist author and attorney Jill Filipovic argued that the Khan trial, which represented a rare instance in which a campus rape charge was prosecuted in a real courtroom and not before a Title IX college tribunal, showed that the criminal justice system is still rife with male bias and misogyny. “The suggestion that the woman was slutty, and therefore must have consented to sex, or perhaps had no right to say no… still works with juries,” wrote Filipovic. She concluded that the legal system needs reform and that survivors of campus sexual assault need the alternative system of campus disciplinary hearings to protect them.

And yet interviews with members of the jury have been strikingly at odds with the notion that Khan walked free because misogynistic and slut-shaming defense tactics worked. The jurors and the alternates who have spoken out -— at least half of them women -— said that they were sympathetic to the young woman and that her choice of a sexy costume did not factor into their decision.

Instead, the real issue was that the evidence did not support her claims, and often directly contradicted them.

In fact, the full story of the rape allegation against Khan turns out to be very different from initial press reports, which portrayed him as a wily predator who knowingly took advantage of a vulnerable young woman.

The first account of the case in the New York Times, published during the trial, made Khan look very guilty. On Halloween night in 2015, the article said, Khan walked the female student back to her dorm room after a campus concert, when she was so intoxicated from drinking at an earlier party that she vomited repeatedly; the next thing she remembered was waking up during the night to find him on top of her and trying to push him off. When she woke up in the morning, she was naked, there were condoms on the floor, and Khan was sleeping on the couch. And then, a particularly damning detail: After Khan left, the woman said she “looked through her phone and found that he had sent messages to her friends on her behalf the night before, declining their invitations to meet up after the show.”

There’s only one problem with that damning detail: It is entirely unproven and incredibly unlikely, since the phone was password-protected.

“The state’s theory was that Khan was in a position where he could have seen her enter the password,” defense attorney Norman Pattis told me. “That was the only way he could have operated her phone.”

Given the young woman’s admitted memory lapses, it seemed much more plausible that she had sent the messages herself and forgotten about them.

The complainant’s level of intoxication, too, was very much in dispute, beyond the uncontested fact that she did go to the bathroom and vomit either once or twice during the concert). Ironically, while the defense attorneys have been excoriated for asking how much she had to drink—with the implication that she was being blamed for getting raped while drunk, their purpose was actually to show that she was not nearly as drunk as she claimed to be. The witnesses, her friends who were also at the concert, gave contradictoryaccounts. One estimated that she was a “four” on a one-to-ten intoxication scale when they left the Halloween party to go to the concert, but an “eight” when they arrived a few minutes later (without any additional consumption of alcohol). Another said she was “above ten” but did not require assistance because she “appeared oriented to time and place.” While the complainant’s testimony suggested that she had thrown up all over her Halloween costume, the dress, brought into evidence by the prosecution, had only a few flecks of something that could be vomit on it.

But the key piece of evidence for the defense, apparently, was security camera footage showing Khan and the complainant on their way back to the dorm after the concert. While the woman testified that the footage showed Khan leading her as she stumbled along, with her eyes closed and one foot dragging behind her, the jurors who repeatedly reviewed the video saw something very different. They described the woman as fully conscious, walking next to Khan with his arm around her shoulders and her arm around his waist, and with a smile or even “a big grin” on her face. Alternate Elise Wiener, who did not participate in the deliberations but sat through the trial, told Reason that the prosecution’s attempts to present the security camera footage as incriminating to Khan were reminiscent of “George Orwell.”

Digital records from student ID card swipes required to open doors at the dorm also supported Khan’s version of the events. He said that when they returned, he initially dropped the complainant off at her room, then went to his own (confirmed by the timing of the card swipes), then came back after she called to him and asked to check on a friend who lived in a different part of the building. (The friend was not in her room, but the card-swipe records confirm Khan’s entry to that section of the dorm.) Khan testified that when he returned, the accuser invited him into her room and made sexual overtures, sitting in his lap and asking what he wanted her to do. After giving him oral sex and vomiting again—which he attributed to gagging rather than intoxication—she went to take a shower. Khan stayed and called his long-distance girlfriend with whom he had an open relationship. While this part of the evening is strictly he said/she said, the girlfriend confirmed that at one point, Khan gave the phone to the complainant and the two of them said hello to each other.

According to Khan, after the conversation ended, the complainant invited him to her bed where they had sex.

There is no question that the woman was upset the next morning when she woke up and saw Khan on her couch and the used condoms on the floor; she even slapped him. However, their text-message exchange after he returned to his own room shortly after 6 a.m. does not suggest that she saw him as a rapist, but rather that she was concerned about potential embarrassment. She replied to his initial text with “LOL”; after he responded with a winky face, she texted, “Go to sleep this will stay between us that goes for you too.”

Later that day, the young woman went to the campus health center to get a Plan B birth control pill and a sexually transmitted disease test, telling a staffer that she had had consensual sex with a regular partner. At some point after that, she met with friends and told them what had happened the previous night. One of them, a former boyfriend, not only encouraged her to report Khan for sexual assault but actually dialed the number of the sexual misconduct office and handed her the phone.

Did any of the defense tactics merit the outrage? Questioning the complainant about her alcohol intake was certainly appropriate, since her intoxication level was key to the charge of sexual assault. Her text messages were also very relevant—not because flirty texting equals consent, but because the messages had direct bearing on the believability of her account. While she claimed that Khan had been practically stalking her in the days preceding the alleged assault and she had tried to avoid him, the records showed she had repeatedly initiated friendly, playful interactions.

More dubious was the defense argument focusing on the woman’s choice of a sexy Halloween costume. Even several Khan supporters to whom I spoke thought it was a bad move showing remarkable obliviousness to the cultural mood.

When I asked Khan’s defense attorney about this tactic, he stubbornly defended it. “In the context of her relationship with Khan, what she wore was relevant to her expectations of that evening,” he told me. “In the text messages, she clearly knew she was going to see him.” That seems like a stretch, especially since Khan was not the complainant’s date for the evening but one of many people she was going to see. And it plays right into “she was dressed like a slut” rape-apology tropes, stoking the outrage that may still affect Khan’s future despite his acquittal.

But if some defense tactics evoked caricatures of victim-blaming, the facts of the case itself seem to strongly support the widespread belief that a large number of campus sexual assault allegations involve morning-after regrets about consensual drunk sex (a claim for which Candice Jackson, an official in Donald Trump’s Department of Education, was pilloried last year). It’s quite possible that the complainant herself sincerely believes she was sexually assaulted and lacked the capacity to either consent or say no. Yet the totality of the circumstances suggests otherwise.

Two other things are worth noting. The case against Khan was marred by police improprieties, including the last-minute disclosure of potentially exculpatory evidence (which prompted a mistrial in October before the case moved ahead). Also, according to filings in the case, the complainant’s interviews with the Yale police department included at least one statement with disturbing overtones of bigotry. The police notes recorded her words as, “From Afghan[istan]. Muslim (violence accepted).”

At present, Khan’s troubles are far from over. Yale will have to decide whether to readmit him to complete his final semester. Because of his immigration status, losing his place at Yale will likely mean that his student visa will be revoked and he will have to return to Afghanistan—where, just four years ago, his uncle was killed in a Taliban terror attack.

Not surprisingly, there is intense pressure on the university not to allow Khan back. In a column repeating some dubious claims—for instance, that the complainant “could not walk unaided” when she and Khan returned to the dorm—Yale Daily News columnist Amelia Nierenberg wrote that readmitting him would be “a grievous mistake.” In Nierenberg view, barring Khan from returning to the campus would be not only an appropriate response to his bad behavior but a strong message that “it is unacceptable at Yale to put alleged victims on trial.” A petition asking Yale not to readmit Khan has collected more than 50,000 signatures.

This sentiment is spurred by skewed media coverage. Other than a New York Times article which briefly quoted members of the jury, all the articles exploring the actual facts of the case so far have appeared in the conservativeorlibertarianpress. And the Times has never corrected its earlier flawed reporting, such as the claim—presented as established fact—that Khan had sent text messages from the complainant’s phone to her friends in an intentional effort to isolate her.

Kicking Khan out will send a bad message indeed: that accusation equals guilt, and public passions can override justice.

If he is reinstated and allowed to complete his degree, this saga, which has caused so much pain, will have had a dual silver lining: that of human solidarity across religious lines, and that of a due-process victory.

Cathy Young is a contributing editor at Reason magazine and is the author of “Ceasefire: Why Women and Men Must Join Forces to Achieve True Equality”. Follow her on Twitter, @CathyYoung63.