Two years ago, Del. David I. Ramadan (R-Loudoun) won his first term representing the Virginia House’s 87th District by just 51 votes.

This year, Ramadan and his Democratic opponent, retired Air Force financial officer John Bell, are prepared for another tight race in one of Northern Virginia’s bellwether territories. The district, which includes parts of rapidly growing Loudoun and Prince William counties, has been closely watched in recent elections.

Ramadan and fellow Republicans say they’re confident that the conservative legislator has won the loyalty of his constituency. But Bell and local Democrats note that a majority of voters in the district supported President Obama in last year’s race for the White House, a sign that the General Assembly seat could potentially flip from red to blue this November.

Both candidates have focused heavily on issues of concern across Northern Virginia: economic growth, fiscal discipline and the mounting traffic congestion in the suburbs. But in the final weeks before the election, Bell’s campaign has also drawn attention to controversial social issues such as reproductive rights and gun control and again raised questions about Ramadan’s subpoena to appear before a federal grand jury as part of an investigation into gifts received by Virginia Gov. Robert F. McDonnell (R).

Ramadan has consistently responded to the attacks by pointing to his record and expressing confidence that his constituents know what he stands for.

“The level of engagement that I’ve had in the community will reflect on Election Day,” he said.

Bell, who is making a second run for political office, has also criticized Ramadan for his vote against a landmark transportation bill passed by the General Assembly this year.

The $3.5 billion measure, which has also served as a polarizing issue in other races across Northern Virginia, will fund transportation construction and maintenance projects by raising sales tax rates and implementing a wholesale tax on motor fuels. Bell said the legislation was a necessary compromise and noted that Ramadan was the only Loudoun delegate to oppose the bill.

“I think that separates him from other Republicans,” Bell said. “This is a district of people with very difficult commutes, and they need relief.”

Ramadan, who has led an ongoing fight against rising toll rates on the Dulles Greenway, said he has clearly proven that he is focused on solving his district’s transportation problems despite his vote against the controversial bill.

“The current makeup of the Commonwealth Transportation Board favors the southern part of the state,” Ramadan said. “I believed the best approach was not to increase taxes on our constituents in Northern Virginia but to fight for a fairer share of the current dollars that our constituents are paying.”

If elected, Bell said he would make ethical reform a priority. He said he remained concerned that Ramadan has still not explained why he was subpoenaed as a witness in the McDonnell probe. Federal prosecutors have been investigating more than $150,000 in gifts and money given to McDonnell and his family by a wealthy donor.

Ramadan has declined to comment on the subpoena but noted that he quickly backed Attorney General Ken Cuccinelli II’s August call for a special legislative session on ethics in the wake of the gifts scandal.

“Nothing is more important to me as an elected official than voters’ trust in their government,” Ramadan said in a prepared statement at the time.

The incumbent said he is confident that his work over the past two years will earn him a second term. Voters have seen his dedication to causes they care about, Ramadan said, such as his persistent efforts to lower greenway tolls and keep tax rates down.

“My record speaks for itself, whether it’s education, transportation, support for veterans,” he said.

The candidates sparred again this week after Bell’s campaign attacked Ramadan’s stance on gun control in a YouTube video that shows footage of Ramadan addressing the Virginia Citizens Defense League.

“I will fight adamantly, any kind of interpretation, any kind of restrictions, any kind of rules, that will limit your rights to own and carry,” Ramadan says in the video. “And I will work hard to eliminate all the existing rules and regulations and limitations that are on the books.”

Bell said in a prepared statement that Ramadan’s “radical” position was dangerous to the community.

“I carried a firearm on my hip in a combat zone, but the Air Force gave me a background check and training before giving me a gun,” Bell said. “It’s just common sense to require background checks, limit access to high capacity magazines and make sure the mentally ill get treatment instead of a weapon.”

The Web ad was taken down, Bell’s campaign manager said, after the owner of the original video complained to YouTube that the use of the video was a copyright infringement. The original post, containing the full video, was set to a “private” setting.

In an e-mail, Ramadan responded to the ad by accusing his opponent of deliberate deception.

“As an avid sportsman, I support the 2nd Amendment and oppose efforts to restrict gun ownership for law-abiding citizens,” Ramadan said. “John Bell’s latest attack is what we have grown to expect from a candidate who is not bound by the truth.”

In the final days of the race, Bell’s campaign reported a surge in fundraising, with nearly $260,000 in contributions in September. Ramadan, who has led his opponent in fundraising in recent months, reported about $93,000 in the same period, according to campaign finance records.