President Donald Trump took to Twitter the morning after a terrorist attack in New York City to criticize a green card lottery which he blamed for allowing the alleged driver into the country.

But the facts are a lot more complicated than Trump’s tweets suggest.

Let’s start with the basics: Eight people were killed and 11 were injured on Tuesday afternoon when a driver struck several pedestrians on a bike path in lower Manhattan, an incident which is being investigated as an act of terrorism. Law enforcement officials have identified the driver as Sayfullo Saipov, 29.

In his tweets, Trump claimed that Saipov got into the country through the Diversity Visa Lottery program, which he argued was a creation of Democrats and Senate Minority Leader Chuck Schumer and claimed was importing “Europe’s problems.”

However, it is not yet confirmed how Saipov came to the U.S., the green card lottery was created on a bipartisan basis by Congress and signed into law by a Republican president, Schumer supported the program but has also sought to end it in recent years and there’s little evidence that the lottery has led to terrorism.

Let’s look at the facts, one by one.

Homeland Security says the man came to the U.S. through a green card lottery

In a tweet Wednesday morning, Trump said that “the terrorist came into our country through what is called the ‘Diversity Visa Lottery Program.'” This claim appears to have originated with a report local ABC affiliate, which cited unnamed authorities.

On Wednesday afternoon, the Department of Homeland Security confirmed that the “individual identified in the New York City terror attack” was admitted to the U.S. “upon presentation of a passport with a valid diversity immigrant visa” in 2010, according to the Washington Post.

The green card lottery was created on a bipartisan basis

In a tweet Wednesday morning, Trump referred to “Democrat Lottery Systems,” an apparent reference to the the green card lottery, also known as the Diversity Visa Lottery program.

But the Diversity Visa Lottery program was created by Congress in 1990 in a bill that passed on bipartisan votes and was signed into law by a Republican president.

Congress created the program as part of the Immigration Act of 1990, and it went into effect in 1995. Under the program, the State Department offers 50,000 visas each year to immigrants from parts of the world where relatively few people have recently immigrated from.

The bill was a bipartisan effort, passing the Senate in an 89-8 vote, with 38 Republicans voting for it, including current Sens. Chuck Grassley, Orrin Hatch and Mitch McConnell. President George H.W. Bush, a Republican, signed the bill into law.

Chuck Schumer created the program, but also sought to end it

On Wednesday, Trump tweeted that the green card lottery is a “Chuck Schumer beauty,” apparently arguing that he was to blame for the program. He then quoted a guest on the Fox and Friends morning show saying that Schumer is “helping to import Europe’s problems.”

The idea for the program came from a bill proposed in 1990 by Schumer, then a member of the House of Representatives. The proposal was then absorbed into the House immigration bill, which passed on a bipartisan basis.

But in recent years, Schumer has sought to do away with the program.

In 2013, he helped write a bipartisan bill that would have gotten rid of the green card lottery while making broader changes to immigration policy. That effort was ultimately blocked by House Republicans who thought it was not stricter on other measures.

Arizona Republican Sen. Jeff Flake, who was a member of the bipartisan Gang of Eight along with Schumer and has sparred with Trump recently, noted that in a response to Trump this morning on Twitter.

There’s little evidence that the program has led to terrorism

Apart from Saipov, whose method of entry into the U.S. has not yet been confirmed, there’s not much evidence that the program has led to terrorism.

In 2002, Egyptian immigrant Hesham Mohamed Ali Hayet, whose spouse came to the U.S. through the program, shot and killed two people at the Los Angeles airport.

In 2004, the State Department’s inspector general raised concerns that the green card lottery “contains significant vulnerabilities to national security as hostile intelligence officers, criminals and terrorists attempt to use it to enter the United States as permanent residents.”

But the U.S. Government Accountability Office reviewed the green card lottery in 2007 and found no evidence that immigrants who came through it posed a threat of terrorism, though it raised concerns about fraud.

“We found no documented evidence of DV [Diversity Visa] immigrants from state sponsors of terrorism committing any terrorist acts,” the report read, adding that “some individuals, including terrorists and criminals, could use fraudulent means to enter or remain in the United States.”

In 2011, the Congressional Research Service looked into the program again, but found no additional evidence that it led to terrorism.

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.