It was a fact-checker's dream.
The two major candidates for president, standing practically toe-to-toe, with contradictory versions of a basic fact: the level of oil production on public lands.
"Production on government land, ..." Mitt Romney began.
"Production is up, " President Barack Obama interrupted.
"Is down, " Romney insisted.
"No, it isn't."
"Production on government land of oil is down 14 percent."
"And production of gas…"
"It's just not true."
The exchange came in response to just the second question of the debate, from Phillip Tricolla of Long Island, N.Y., who asked the president about gas prices. Romney pounced on Obama's response that the most important thing the nation can do is "control our energy, " claiming overall production under his administration is up.
So who is right?
Our Investigations Inc. fact-checking team scoured the database of the U.S. Department of Energy's Energy Information Administration, which keeps records going back to the 1920s. We found Romney's statistic on oil production misleading. But Obama's claim of credit for increased domestic production is misleading as well.
Here are the official government numbers:
In 2008, the year before Obama took office, sales of crude oil produced on federal lands totaled 575 million barrels. The number jumped to 642 million in 2009, and 739 million in 2010. But public lands include "lands" offshore. And following the Deepwater Horizon disaster on April 20, 2010, the Obama administration declared a temporary moratorium on offshore drilling. Largely as a result, sales dropped to 646 million barrels in 2011 — the 14 percent drop Romney cited.
(Read More: Debate II: Obama Goes on Offensive Against Romney )
The 2011 figure was still higher than it was when the president took office, however. And analysts have predicted when 2012 is over, the number will be higher still. In fact, a Citigroup report says "production is bouncing back" since the moratorium was lifted, and this year the U.S. "could well recoup the depletion it lost since 2010."
Romney should know the report well, since his campaign cites it in a white paper on energy policy issued on Aug. 23. The report says North America is already on a path to energy independence by 2020 — a Romney campaign promise.
But as we first reported in September, it is a stretch for the president to claim credit for the nation's improvement on energy self-sufficiency. U.S. crude oil production is at its highest level since 1998, according to the EIA. That is a 14-year high instead of the 16-year high the president claimed, but still seems impressive. Except that the trend began long before Obama took office, starting when production began to rebound following Hurricanes Katrina and Rita in 2005.
As for energy independence, government and private analysts agree one of the biggest factors in the improving picture is not government policy but falling demand as a result of the economic slowdown.
The candidates also clashed on coal, with the president claiming that coal production is up on his watch. While production has increased slightly each year he has been in office, it is down sharply from where it was at the end of the Bush administration, according to EIA statistics. Production hit a record 1.171 billion tons in 2008. It dropped by nearly 100 million tons as the recession took hold in 2009, to 1.075 billion tons. In 2011, the U.S. produced 1.094 billion tons of coal, a six-and-a-half percent decline since 2008.
The president's claim that coal employment is up was also misleading. Total employment in the sector is down by about 3, 000 since Obama took office in 2009, according to the Bureau of Labor Statistics. But it is true that coal employment has rebounded slightly from where it was a year ago.
The president was also accurate in recounting how Romney, as governor of Massachusetts, was critical of coal.
"You stood in front of a coal plant and pointed at it and said, 'This plant kills, ' and took great pride in shutting it down, " the president said. "And now suddenly you're a big champion of coal."
Indeed, the Boston Globe reported it as Romney's "first major environmental stand" as governor when he demanded on Feb. 6, 2003 that the Salem Harbor Station power plant meet a 2004 deadline to clean up its emissions.
"I will not protect jobs that kill people, " Romney said at a news conference in front of the plant, adding, "And that plant kills people."
The candidates also clashed sharply on the president's response to the Sept. 11 attack on the U.S. consulate in Benghazi, Libya — a clash that briefly put moderator Candy Crowley of CNN in the middle. Romney claimed Obama waited two weeks to acknowledge the attack was not merely a spontaneous demonstration that got out of control.
The president called the allegation "offensive."
"The day after the attack, governor, I stood in the Rose Garden and I told the American people in the world that we are going to find out exactly what happened. That this was an act of terror and I also said that we're going to hunt down those who committed this crime, " the president said.
"I want to make sure we get that for the record because it took the president 14 days before he called the attack in Benghazi an act of terror, " Romney said.
"Get the transcript, " Obama said.
We did, and the president's remarks leave room for interpretation.
Speaking in the Rose Garden on Sept. 12, Obama variously referred to the killings of the U.S. ambassador and three other Americans as an "outrageous and shocking attack, " "senseless violence, " and "brutal acts."
Then, he said this:
"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. Today we mourn for more Americans who represent the very best of the United States of America. We will not waver in our commitment to see that justice is done for this terrible act. And make no mistake, justice will be done."
While the president says he was clearly referring to the previous day's attacks when he used the term "acts of terror, " Romney supporters say he was speaking in generalities at that point in the speech. Romney pointed to the fact that in a series of television appearances four days later, United Nations Ambassador Susan Rice was still characterizing the attack as the result of a spontaneous demonstration.
By the time Obama's weekly radio address was released on Sept. 15, three days after the Rose Garden speech, his language had become more vague. The speech focused on the Benghazi attack, but did not include the word "terror" or "terrorism."
Both candidates talked tough on China, but the president tried to gain the upper hand by casting Romney as a hypocrite. The claim does not exactly mesh with the facts.
"When he talks about getting tough on China, keep in mind that Governor Romney invested in companies that were pioneers of outsourcing to China, and is currently investing in countries — in companies that are building surveillance equipment for China to spy on its own folks, " Obama said.
The Romney campaign pushed back hard against a Washington Post story in June, often cited by the Obama campaign. The story said that during his 15 years running Bain Capital, "it owned companies that were pioneers in the practice of shipping work from the United States to overseas call centers and factories making computer components, according to filings with the Securities and Exchange Commission."
The Romney campaign claims four of the six companies analyzed in the Post story actually added U.S. jobs, while the other two companies were acquired after Romney left active involvement with Bain Capital in 1999 to run the Salt Lake City Olympics.
The date of Romney's departure from Bain has been the subject of debate, however, since he was still listed on government filings as CEO until 2001. The Post denied a request by the Romney campaign that the story be retracted.
Regardless, Bain's investment in Uniview Technologies — the Chinese maker of surveillance equipment — occurred in 2011, according to published reports. And while Romney still receives income from Bain, his investments are in a blind trust.
For his part, Romney hit hard at the president's economic record, but appeared to miss the mark when he talked about the deficit.
"He said when he was running for office, he would cut the deficit in half. Instead he's doubled it, " Romney said. It was a charge he leveled in the first debate, and repeated twice in this one.
But in fact, the deficit has not doubled under Obama.
In 2009, before the president took office, the Congressional Budget Office projected a $1.2 trillion deficit. The most recent estimate is just under $1.1 trillion.
So Obama did not double the deficit, but he did fail to keep his promise to cut the deficit in half.
—By CNBC's Scott Cohn