The pressure was on at Hofstra Tuesday night as President Barack Obama and Mitt Romney faced off for their second debate.

With Obama urgently needing to make up for a lackluster performance during the first debate and Romney looking to fend off a fusillade of attacks that didn’t come his way last time, the truth sometimes got caught in the crossfire.

Here’s POLITICO’s take on how closely the candidates hewed to the facts during their town hall-style showdown:

Terrorism in Libya

Obama: “I said that this was an act of terror.”

While Romney insisted Obama never made this statement, on the day after the Benghazi attack, the president did strongly suggest it was a terrorist strike. But he didn’t say outright that the Benghazi attack was an act of terrorism.

“No acts of terror will ever shake the resolve of this great nation, alter that character, or eclipse the light of the values that we stand for,” Obama said in a Rose Garden statement about the death of U.S. Ambassador to Libya Chris Stevens and three other Americans.

The ambiguity there has given Romney and his supporters something to latch onto — they say the president was talking broadly, and not about the Benghazi attack specifically. And in the days that followed, the White House seemed reluctant to call it a terrorist attack. On Sept. 16, U.S. Ambassador to the U.N. Susan Rice went on several TV talk shows and declared that the U.S. government’s preliminary assessment was that the violence sprang from a “spontaneous” demonstration related to an anti-Muslim video.

Director of National Intelligence James Clapper has said that Rice’s account was based on the initial take of U.S. intelligence agencies. They subsequently changed their view and now assess the incident as a pre-planned terrorist attack.

Obama: “Look, the cost of lowering rates for everybody across the board 20 percent, along with what he also wants to do in terms of eliminating the estate tax, along what he wants to do in terms of corporates changes in the Tax Code — it costs about $5 trillion. Gov. Romney then also wants to spend $2 trillion on additional military programs, even though the military’s not asking for them. That’s $7 trillion. He also wants to continue the Bush tax cuts for the wealthiest Americans. That’s another trillion dollars. That’s $8 trillion.”

Obama’s math overshot by about $1 trillion, by most estimates.

The president said Romney’s budget plan would cost $8 trillion — $5 trillion in tax cuts, $2 trillion in additional military spending and $1 trillion from the extension of the Bush tax cuts for the wealthiest Americans.

Romney’s tax plan is estimated to cost $5 trillion — including the cost of extending the Bush tax cuts.

Romney says that he would offset the cost of those tax cuts, in part by eliminating or scaling back taxpayer’s ability to take credits and deductions. He has not given full details, but again floated the idea of a $25,000 cap on deductions, as he did in the first debate. Before that, he had discussed a $17,000 cap.

The combined cost of Romney’s tax plan and military spending hits only $7 trillion, which is the number Obama’s campaign used in a memo released during the debate highlighting what it called Romney’s “sketchy deal.”

Assault weapons

Romney: “We of course don’t want to have automatic weapons, and that’s already illegal in this country to have automatic weapons.”

This was correct — until about eight years ago.

Certain types of semi-automatic firearms were banned by a law that Bill Clinton signed 1994, but it expired a decade later. Obama noted during Tuesday’s Long Island debate he’d like to get the ban reintroduced in Congress, but the chances of it passing are slim. Fully automatic weapons also aren’t illegal, though they are highly regulated by federal and state authorities.

Romney made a similar comment about “illegal” weapons after the Colorado movie theater shooting, though a spokesman later emailed FactCheck.org to explain that the Republican was referring to the bombs in alleged shooter James Holmes’ apartment.

Auto bailout

Romney: “One thing that the president said which I want to make sure we understand. He said that I said that we should take Detroit bankrupt. And that’s right. My plan was to have the company go through bankruptcy like 7-11 did and Macy’s and Continental Airlines and come out stronger.”

Obama: Romney’s policy was to “take them into bankruptcy without providing them any way to stay open, and we would have lost a million jobs. Don’t take my word for it, take the executives at GM and Chrysler, some of whom are Republicans, may even support Gov. Romney. But they’ll tell you his prescription wasn’t going to work.”

Both comments are technically true — but it’s not that easy. A 2008 op-ed from Romney titled, “Let Detroit Go Bankrupt” — a headline that was written by The New York Times, the Romney camp has said — argued that the companies would fail if the government bailed them out. Romney was blunt in his introduction: “If General Motors, Ford and Chrysler get the bailout that their chief executives asked for on Tuesday, you can kiss the American automotive industry goodbye. It won’t go overnight, but its demise will be virtually guaranteed.”

Romney is correct that his plan was to have them go into bankruptcy, but the op-ed claims have proven false. While the government is still owed billions, GM stock prices were up 15 percent in the most recent quarter, beating industry expectations.

Obama’s claims also are true. A 2010 study from a U.S. auto industry think tank, the Center for Automotive Research, estimated the bailout saved 1.1 million jobs in 2009 and 314,000 in 2010.

“These loans and other financial assistance provided to General Motors and Chrysler by the U.S. and foreign governments averted certain economic catastrophe had the companies been allowed to fail,” the report says.

There was also some broader context that neither candidate talked about. While only GM and Chrysler (and their respective financing arms) got bailout dollars, Ford executives said their company would have faced major problems had the other two gone under, thanks to ripple effects with parts suppliers and other industries.

The auto bailout originally started in late 2008 with $17 billion in emergency loans under President George W. Bush.

Gas prices

Romney: “The proof of whether a [energy] strategy is working or not is what the price is that you’re paying at the pump. If you’re paying less than you paid a year or two ago, why, then, the strategy is working. But you’re paying more.”

Criticizing the president for policies that have pushed up gas prices may pack a political punch. But it’s the international markets that have the most effect.

That’s what shapes whether gas is $2, $3 or $4 for a gallon, not drilling for oil in Alaska’s Arctic National Wildlife Refuge or permitting the Keystone XL pipeline — two policies Romney supports and Obama opposes. Yes, there are some things a president can do around the edges on gas prices, including suspending federal gas taxes, loosening EPA rules that require cleaner fuel blends because of air pollution or tapping the Strategic Petroleum Reserve.

But the difference wouldn’t be all that much on day-to-day fuel prices. Even President George W. Bush, a former Texas oilman, bemoaned how he didn’t have a “magic wand” to deal with U.S. record $4 gas prices during the final months of his second term.

Immigration

Obama: Romney “called the Arizona law a model for the nation. Part of the Arizona law said that law enforcement officers could stop folks because they suspected maybe they looked like they might be undocumented workers and check their papers.”

Obama’s claim that Romney publicly endorsed Arizona’s S.B. 1070, the stop-and-check law for suspected illegal immigrants, is off the mark.

In a February 2010 debate, Romney expressed support for how Arizona’s handles immigration, but he was clearly referring to a law passed in 2007 that forced employers to confirm their employees’ right to work in the U.S.

“You know, I think you see a model here in Arizona,” Romney said in that debate. “They passed a law here that says, that says that people who come here and try and find work, that the employer is required to look them up on E-Verify. “

While Romney didn’t endorse S.B. 1070, it’s also fair to note he never repudiated it and likely was being deliberately ambiguous about it during the GOP primary campaign. Obama’s claim that Kansas Secretary of State Kris Kobach, who helped write the Arizona law, is Romney’s “top adviser on immigration” also stretched the truth a bit. Romney’s campaign has described Kobach as an “informal adviser” on immigration.

Romney’s tax burden

Obama: Romney “only has to pay 14 percent on his taxes when a lot of you are paying much higher.”

Obama actually understated his point here. In 2011, if Gov. Romney had taken all his deductions, he would have owed only 12.1 percent in taxes. He and his wife Ann made $4 million in charitable deductions last year, but took only $2.25 million off his taxes.

By passing up the full deduction, Romney lifted his tax rate to 14.1 percent, which was in keeping with an aide previously made that the former governor paid at least 13 percent in taxes each year.

If Obama was suggesting that a lot of Americans pay more than 14 percent in income taxes, that’s not the case. According to the Tax Foundation, typical U.S. taxpayers with $50,000 to $75,000 in income pay an average 7 percent income tax rate. However, if you add in Social Security and Medicare taxes, the total federal tax rate for that group is normally about 15 percent, though it’s about 13 percent at the moment due to a temporary cut in Social Security taxes. That’s about the same rate Romney paid in 2011.

Who pays at a “much higher” rate than Romney? Taxpayers making between $500,000 and $1 million pay an average 24 percent in income taxes. Those with very high incomes, like Romney, tend to pay a lower rate because most of their income is in dividends and capital gains, both of which are taxed at 15 percent.

Health care premiums

Romney: “He said that by now middle-income families would have a reduction in their health insurance premiums by $2,500 a year. It’s gone up by 2,500 a year. And if ‘Obamacare’ is passed — or implemented — it’s already been passed. If it’s implemented fully, it’ll be another 2,500 on top.”

Romney is correct in saying that premiums actually went up by about $2,500 —$2,370, according to a Kaiser Family Foundation survey. That’s the total amount, paid by the employer and the worker.

But Romney is making a guess on what happens next.

The Congressional Budget Office has also forecast that some people’s premiums would rise under the Affordable Care Act. But that was more focused on people who don’t get their insurance on the job and who will be able to get covered in new insurance exchanges. Premiums might rise but people would also have more benefits than in the current individual and small-group markets. In addition, millions of people would be getting subsidies, so they wouldn’t bear the full cost of rising premiums.

Energy production on federal lands

Romney: “Oil production is down 14 percent this year on federal land, and gas production was down 9 percent.”

In fact, the Congressional Research Service has said that oil production on federal lands was up slightly in 2011 compared with 2007.

Republican and industry critics say Obama doesn’t deserve the credit — arguing that the increase is because of policies put in place under George W. Bush. But energy analysts have also pointed to technological advances and high global oil prices as the key driver behind the rise in U.S. oil production.

But the complete picture behind Obama’s boast that domestic oil and natural gas production have increased under his watch is more complex.

According to the U.S. Energy Information Administration, sales of crude oil and other “condensate production” on federal lands and waters are down from last year — though they’re higher than during the later years under Bush. The agency says that amounts to 627 million barrels in 2011, 726 million barrels in 2010, 632 million barrels in 2009, 565 million barrels in 2008, 619 million barrels in 2007 and 572 million barrels in 2006.

The agency also reported in March that total natural gas sales of production from federal and Indian lands have decreased annually since fiscal year 2003, with FY11 down 10 percent from FY10 and 31 percent from FY03. Offshore natural gas sales have been going down over the past nine years, falling more than 60 percent.

All told, the agency has said that total sales of fossil fuels production on federal and Indian lands last year were at their lowest point since at least 2003. These sales rose about 1 percent between fiscal 2009 and 2010 but dropped by about 6 percent between FY10 and FY11.

Obama fundraising after Libya attack

Romney: “[O]n the day following the assassination of the United States ambassador, the first time that’s happened since 1979, when — when we have four Americans killed there, when apparently we didn’t know what happened, that the president, the day after that happened, flies to Las Vegas for a political fundraiser, then the next day to Colorado for another … political event.”

Obama did go to Las Vegas on Sept. 12. But it was for an open press campaign rally there, not a fundraiser. The event was pushed back a few hours so that the president could first speak about the Benghazi attack from the Rose Garden, with Secretary of State Hillary Clinton by his side. Obama continued on to Colorado that night for another planned day of campaigning there.

Though Romney attacked the president for engaging in politics the day after Ambassador Chris Stevens and three other Americans were killed, the Republican candidate didn’t abstain from politics that day himself. He spoke at a fundraiser at a hotel in Jacksonville, Fla., beginning with a moment of silence for the four Americans but then moving on to attacks on Obama. He raised $2 million at the event, according to reports from that day. On Sept. 13, Romney again campaigned in Virginia.

Apple manufacturing in China

Debate Moderator Candy Crowley: “iPad, the Macs, the iPhones, they are all manufactured in China. One of the major reasons is labor is so much cheaper [there.]”

Maybe. Labor costs are a key reason that companies make inexpensive products in China, but late Apple CEO Steve Jobs told Obama that wasn’t necessarily the central reason when it came to his firm’s pricier gadgets. Jobs said factories making Apple products could be moved to the U.S. if American workers were better trained.

Walter Isaacson’s biography of Jobs says the Apple founder told Obama that what was keeping Apple from building plants in the U.S. was a shortage of 30,000 engineers.

“‘You can’t find that many in America to hire,’ [Jobs] said. ‘If you could educate these engineers,’ he said, ‘we could move more manufacturing plants here.’”

The book suggests Jobs believed U.S. regulations make it harder to build here, but doesn’t support the idea that wage differentials are key.