Republican George Allen and Democrat Timothy M. Kaine faced off in Richmond in the first debate of the 2012 Senate race Monday, clashing over the best way to right the nation’s economy and fix its finances.

“Tim and I have very different visions for the future,” Allen said early on, voicing one point on which the two could agree.

Fiscal matters dominated the 90-minute debate, but the candidates’ often-feisty exchanges also touched on their records as governors of Virginia and in other elective offices. Allen’s so-called “macaca moment” came up, as did an audit of the Virginia Department of Transportation conducted after Kaine left the governor’s mansion, which found unspent millions.

The Senate race is expected to be one of the most closely watched in the nation, taking place as it does in a swing state critical to President Obama’s reelection hopes. Obama’s name came up countless times in the debate, as Allen noted Kaine’s close association with the president. While some Virginia Democrats have tried to distance themselves from Obama, Kaine did not, noting several times that the president had saved the auto industry and taken down Osama bin Laden.

There was one major gaffe, in which Allen seemed not to understand neither how birth control pills work nor the full impact of a “personhood amendment” he is promoting. The bill would not outlaw the pill, Allen said, because it prevents contraception from taking place.

“How do you think birth control pills and intrauterine devices work?” reporter Bob Lewis of the Associated Press, one of the questioners, asked.

Allen noted that he is not a doctor, but relying on what he knew and “maybe a little bit of Latin,” he said he understood “contraception” to mean something that prevents conception.

Kaine set him straight: “Modern birth control pills have a double mechanism either to stop fertilization or stop [a fertilized egg] from implanting. IUDs stop a fertilized egg from implanting.”

Allen tried to paint Kaine, a former Democratic National Committee chairman, as a liberal who sided with Obama on the economic stimulus, health care and climate change.

Kaine suggested that Allen was too close to traditional energy industries, voting for subsidies for “Big Oil,” to be open to alternatives.

“We can’t have oil-covered glasses and look at everything that way,” Kaine said.

“We don’t need people who pledge allegiance to Grover Norquist,” Kaine said at another point, referring to the conservative anti-tax activist.

The Senate race is expected to be one of the most competitive in the nation, and could help determine which party controls the U.S. Senate after 2012, when Democrats must defend 23 seats and Republicans must defend 10.

The fight for retiring Sen. James Webb’s (D) seat is expected to cost more than $20 million as the candidates try to get their messages across in a rapidly changing state where many voters arrived after Allen and Kaine served as governor. Allen also served in the Senate.

The former governors debated at the Associated Press Day at the Capitol, an annual event sponsored by the Virginia Associated Managing Editors and the Virginia Capitol Correspondents Association .

Both men mostly smiled throughout, though the smiles looked strained at some points, as when a questioner asked Allen about his use of the racial slur “macaca” during his 2006 Senate campaign.

A trio of veteran Richmond reporters — Lewis of the AP, Ryan Nobles of NBC12 and Michael Sluss of the Roanoke Times — asked questions. Bob Gibson, executive director of the Sorenson Institute for Political Leadership at the University of Virginia, moderated.

Allen and Kaine are not the only candidates in the race, but the other six contenders failed to meet the debate’s qualifications for participation: averaging 15 percent or better in published, non-candidate primary polls; and raising at least 20 percent as much money as his or her party’s front-runner.

Four other candidates — businessman Tim Donner, lawyer David McCormick, Bishop E.W. Jackson and tea party activist Jamie Rad­tke — are competing in the Republican primary. Two others — Julien Modica, a health-care company executive, and Courtney Lynch, founding partner of a consulting firm — are running in the Democratic primary.

Radtke supporters held a protest outside the Capitol during the debate. Modica sued to get into the debate, but the lawsuit was dismissed Friday.

The Republican Party of Virginia announced last month that it would host three Senate candidate debates before the June 12 primary: one in April in Roanoke, one in May in Northern Virginia and the third in May in Hampton Roads.