Donald Trump, Republican nominee for president of the United States, got where he is by bashing immigrants. Melania Trump, potential first lady of the United States, is an immigrant herself.

But what kind of immigrant is she?

Trump’s now a US citizen; she was naturalized in 2006 after marrying Donald. But she’d been in the US for a decade before that, and her immigration history during that decade is a little murkier.

There have been questions about what sort of immigration status she had when she first came to the US as a model in the mid-1990s — and over the summer, news of a nude photoshoot she did for a French magazine raised the possibility that she’d actually worked in the US illegally. And there have been questions about how she went from modeling on a temporary visa to getting a green card to stay in the US, four years before she and Donald got married.

Now, Melania Trump, through a lawyer, has released a letter that clears up some of the confusion, but not all of it. The news report that started the controversy, meanwhile, has been proven false in some important ways.

It probably would have been smarter for the Trump campaign to put out the letter sooner, instead of allowing the controversy to fester for weeks. And it definitely would be smarter to put out some documentation that might clear up the remaining questions about the credibility of Melania and the lawyer as sources.

But as it stands right now, there isn’t firm evidence suggesting that Melania Trump violated any US immigration law.

Here’s what we know — and why there was such a brouhaha to begin with.

What Melania Trump says about her immigration status

In September, Melania Trump tweeted out a letter, signed by lawyer Michael Wildes (a longtime associate of Donald Trump), testifying that he’d looked over her immigration records and hadn’t found anything indicating that at any time she’d violated US immigration law.

Here’s the timeline the letter presented for Melania (then Melania Knauss):

In August 1996, Melania first came to the US on a "business visitor" visa — a type of tourist visa that allowed her to stay in the US for several months, but didn’t allow her to work legally.

Melania first came to the US on a "business visitor" visa — a type of tourist visa that allowed her to stay in the US for several months, but didn’t allow her to work legally. In October 1996, she was issued an H1B work visa: something that’s generally used for "high-skilled" workers with college degrees, but which also has a subcategory set aside for fashion models. That visa allowed her to work legally in the US.

she was issued an H1B work visa: something that’s generally used for "high-skilled" workers with college degrees, but which also has a subcategory set aside for fashion models. That visa allowed her to work legally in the US. She renewed her H1B visa every year until 2001.

until 2001. In 2000, she applied for a green card for herself, and in March 2001, she became a lawful permanent resident (green-card holder) in the United States.

(green-card holder) in the United States. Melania then became a US citizen in 2006, after she married Donald Trump. (The letter doesn’t mention this, because it’s not a fact anyone has disputed.)

This is a perfectly plausible timeline.

It’s fair to ask why the Trump campaign didn’t publish this letter when questions began to come up about Melania’s immigration history over the summer. It’s fair to ask why the letter wasn’t signed by the lawyer who actually helped Melania through this process.

And it’s certainly fair to question Wildes’ credibility. He’s admitted to helping Trump’s own defunct modeling agency, Trump Model Management, apply for H1-B visas for models by overstating how much the models would be paid — which appears to be a violation of immigration law in its own right. (He justified his actions by telling CNN that US immigration laws "are archaic.")

But if the case in favor of Melania is coming from questionable sources, the case against her is weaker still. There are some people who’ve made claims that contradict the letter’s timeline (including some comments by Melania herself), but the "evidence" that started this whole controversy might have been one enormous mistake.

How Melania Trump’s nude photos became an immigration scandal

On July 30th, the New York Post published nude photos (strategically blurred, but still not safe for work) of Melania Knauss. The photos were taken for a photoshoot for the French edition of Max magazine, a men’s magazine that went defunct in 2006.

The Post reported that the "sexy photo spread appeared in the January 1996 issue of Max Magazine, whose cover featured a photo of supermodel Cindy Crawford." And the photographer, Alé de Basseville (who claims to be descended from the first king of Norway) told the Post that they’d been taken at a shoot in Manhattan in 1995.

At the time the Post ran the story, Melania was maintaining that she’d come to the US in 1996, but hadn’t given any details about when or what sort of visa she was on. The Post article appeared to reveal that, before she admitted to living in the US, she was not just in Manhattan but working as a model.

The apparent inconsistency set off a lot of questions. It made it seem like Melania Trump had something to hide when she said she’d come to the US in 1996.

In particular, it gave rise to the possibility that Melania Trump had done the photoshoot before she’d been legally allowed to work in the US: that she’d come to the US on a tourist visa, and violated the terms of that visa by doing modeling work. By some definitions — since violating the terms of a visa technically nullifies the visa — that would have made her an "illegal immigrant," or at very least an illegal worker.

Tourist visa abuse was an extremely common ploy among models in the 1990s, especially from Eastern Europe. And it was consistent with some puzzling statements Melania’d made in interviews about having to go back "every few months" to get her visa renewed — something she wouldn’t have had to do on a work visa, but would have had to do as a tourist.

It looks like Trump and her lawyer are telling the truth about when she did the photoshoot

Melania Trump’s lawyer actually addressed the claims directly in the September letter, saying that "the photo shoot in question did not occur until after she was admitted to the United States in H1-B status in October 1996."

Without seeing the actual magazine spread in which Melania’s photos appeared, we don’t know for sure whether the Post or Trump is right about the dates. But It sure looks like Trump and her lawyer are right, and the Post and the photographer are wrong.

Here’s why.

The Post said that the spread had appeared in the January 1996 issue of Max, and that that issue had Cindy Crawford on the cover. Neither of those is an accurate statement.

Max Magazine didn’t have a "January issue" in 1996. It had a double issue for December/January, and then a February issue (which came out in January).

Cindy Crawford appeared on the cover of a February issue of Max. Since that issue came out in January, it’s probably the one that the Post and the photographer were thinking of. But it’s the February 1997 issue — which came out in January 1997, and which could absolutely have featured a photoshoot that took place in late 1996.

The photographer, de Basseville, confirmed to Talking Points Memo that the Melania spread ran in the February 1997 issue (and said that he didn’t remember when exactly the shoot occurred, contrary to what the Post reported). That’s consistent with the timeline presented by Melania Trump’s lawyer.

The paper probably didn’t think it was publishing a huge scoop about Melania’s immigration status — the point of the article was the nude photos of a potential first lady of the United States. But it created a huge rigmarole that might not have happened at all had the Post simply gotten its facts right.

It’s not quite an open-and-shut case. There’s some other evidence out there that Melania Knauss came to the US in 1995: A former roommate told journalist Julia Ioffe that he’d lived with Melania in Manhattan starting in 1995, and two Slovenian journalists, in an unauthorized biography published earlier this year, date her move to 1995 as well.

Then there are Melania’s own comments in interviews. In January, she described the visa process to Harper’s Bazaar as "You have to fly back to Europe every few months to stamp your visa. And in 2015, she told People that "I apply for the visa after two years when I was here."

Neither of these jibe with the timeline presented in the letter — the comment about applying after "two years," in particular. (There’s also the possibility that Melania came to the US in August 1996 on a tourist visa, but started working immediately — though there’s no evidence of this beyond the fact that a lot of other models were doing it.)

But as it stands, this is all he said/she said: enough to raise questions about consistency, but not so much that it can’t be explained away by imprecision and misremembering. The only documentation that Melania Trump was lying about when she came to the US was the nude photoshoot — and it looks like that wasn’t actually evidence at all.

The less likely but more serious allegation: Melania got her green card through a secret first marriage

What Melania’s immigration status was when she first came to the US is one question. How she got her green card in 2001 — allowing her to stay in the US indefinitely — is another.

Let’s go back to Trump lawyer Michael Wildes — the one who signed the September letter. In August, during the brouhaha over her questionable work history, Wildes told Univision that he’d helped her apply for her 2001 green card as an immigration lawyer for the Trump Organization — and that she’d qualified for it "based on marriage": i.e., being married to a US citizen.

Melania Trump and Donald Trump didn’t get married until 2006. Melania Trump has said she’s never been married before.

Wildes clammed up when Univision asked him follow-up questions. And in September, the letter he signed claimed that Melania had gotten her green card another way: thanks to her "extraordinary ability" as a model.

This is certainly possible. Some immigration lawyers argue, however, that it would be very difficult. In 2001, Melania Knauss was mostly known as Donald Trump’s girlfriend — something an immigration agent could hypothetically take as evidence of prominence, but probably wouldn’t. "If someone came to me with her ability, it would be very dubious she would get it," immigration lawyer Bruce Morrison told the Washington Post.

If it did turn out to be true that Melania Trump has been married before, and that that’s how she got her green card, that would be big news. At very least, it would raise questions about why the Trumps hid an entire prior marriage from the public. And if Melania got married in 2001 so that she could get a green card, that’s straight-up illegal: It’s called marriage fraud, and it’s something Immigration and Customs Enforcement has put serious effort into preventing and tracking down.

But there’s even less evidence that Melania got married before getting her green card than there is that she came to the US in 1995. The only piece of evidence is Wildes’ comments to Univision in August — which he’s later contradicted. No one has come forward with any other recollection.

Again, there doesn’t appear to be enough here to believe that Melania Trump is lying. There are just stubborn questions.

Maybe it’s a bad idea to try to figure out who’s "illegal" from the outside

The idea that Donald Trump, who won the nomination of the Republican Party by railing against illegal immigration, could have married someone who was once an "illegal" immigrant is a delicious irony. It’s not hard to see why many Trump opponents were enthusiastic about the idea — or about the allegations that the Trump Organization violated immigration law with its own models in the 2000s.

But in the case of Melania Trump, it looks like the controversy over her immigration status could have been nothing more than a comedy of errors. All it took was some lazy fact-checking from the New York Post and a few attempts to recall the timeline of events that happened two decades ago, and a whole furor got started — including a petition to strip Melania of her citizenship and deport her.

If it’s that easy to make a mistake that throws someone’s entire 20-year immigration history into question, maybe immigration policy is a complicated thing. Maybe it’s not so easy to know, given public information, who’s legal and who isn’t.

Not that the Melania controversy is likely to change many Trump supporters’ minds: Most of them are worried about immigration not because of law, but because they’re worried about immigrants threatening and diluting American values. For many Americans, how desirable an immigrant is doesn’t depend on legal status but on ethnicity, religion, skill, and language ability — and an Eastern European model who speaks fluent English doesn’t exactly set off any alarms.

But it would be nice if Melania herself, not to mention her husband, took away from this whole endeavor the important lesson: If you empower the public to turn against suspected "illegal" immigrants — whether or not the public’s correct about who’s "legal" and who’s not — people will definitely get hurt.