President Donald Trump delivered his third State of the Union address Tuesday, mixing fact with falsehood in his address to the nation.

The president said the state of the union was "stronger than ever before," offering a deeply partisan speech that celebrated the economy and his recent trade deals while warning against Democrats' election promises to rework the health care system.

NBC News fact-checked his address in real time.

Claim 1

"Thanks to our bold regulatory reduction campaign, the United States has become the Number 1 producer of oil and natural gas in the world, by far," Trump said, according to an excerpt of the speech released in advance.

The facts: Trump is taking undue credit here. The U.S. has been the largest natural gas and oil producer since 2011 and 2014, respectively, according to the U.S. Energy Information Administration, the agency that tracks this information. Trump took office in 2017.

Claim 2

"After losing 60,000 factories under the previous two administrations, America has now gained 12,000 new factories under my administration," Trump said, according to the remarks prepared for delivery.

The facts: Trump is mostly right, although his numbers are slightly off. The U.S. lost 53,659 factories during the two previous administrations, not 60,000, according to the Bureau of Labor Statistics, or BLS. But he's correct in saying the trend has reversed under his administration. From 2017 to the second quarter of last year, the U.S. added 12,074 factories, according to the most recently available data from the BLS.

Claim 3

"Since my election, we have created 7 million new jobs, 5 million more than government experts projected during the previous administration," Trump said.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The facts: This number is misleading. Trump is taking credit for months of job gains that occurred during the administration of President Barack Obama. The economy, however, doesn't move that quickly. Since Trump took office, the country has added 6.7 million job in 36 months. He also suggests that this is unprecedented success that no one could have predicted, but it's not: In the 36 months before Trump took office, 8.2 million jobs were created during the Obama administration.

Claim 4

"If we had not reversed the failed economic policies of the previous administration, the world would not now be witnessing this great economic success," Trump said.

The facts: Economists believe the current period of economic growth began during the Obama administration. Some say Trump's tax cuts might have boosted it, but the economy was not on the decline when Trump took office.

Claim 5

"Unemployment rates for African Americans, Hispanic Americans and Asian Americans has reached the lowest levels in history," Trump said.

The facts: This is true. Unemployment rates for each group reached the lowest levels on record, although all three have since ticked up slightly.

Claim 6:

"I've also made an ironclad pledge to American families: We will always protect patients with pre-existing conditions," Trump said.

The facts: This is false. We've fact-checked this claim before, because Trump has been saying it for years. But the evidence doesn't back him up: The Trump administration backed a lawsuit claiming that the Affordable Care Act's protections for pre-existing conditions are illegal, and the White House has not proposed alternative legislation that would offer those with pre-existing conditions the same protections that Obamacare offers.

Claim 7:

"And I was pleased to announce last year that for the first time in 51 years, the cost of prescription drugs actually went down," Trump said.

The facts: This is false. Prescription drugs costs are on the rise, particularly for name-brand drugs, according to an Associated Press analysis.

Claim 8:

"Before I took office, health insurance premiums had more than doubled in just five years. I moved quickly to provide affordable alternatives. Our new plans are up to 60 percent less expensive and better," Trump said.

The facts: This is half-true. Health insurance premiums did, indeed, double in five years, according to a government report, and the plans Trump is talking about can be much, much cheaper. But they are cheap for a reason: They cover significantly less care and come with a slew of risks.

Claim 9:

"In sanctuary cities, local officials order police to release dangerous criminal aliens to prey upon the public instead of handing them over to ICE to be safely removed," Trump said.

This is false. "Sanctuary cities" typically refers to cities that do not cooperate with detainer requests from Immigration and Customs Enforcement, which are requests for sheriffs and police officers to detain undocumented immigrants so ICE can arrest them later. But sanctuary cities still enforce their own — and other jurisdictions' — criminal laws, and some police officers say these sanctuary policies actually help them fight crime.