The AP-GfK poll of 601 likely Virginia voters showed 49 percent for Obama to 42 percent for McCain with two percent undecided.
In Virginia's Senate race, Democrat Mark Warner leads Republican Jim Gilmore 58 percent to 32 percent.
Obama had substantial advantages on issues of the economy, the global financial crisis and health care. On national security, an issue former Navy pilot McCain should own, they are about even.
Political coverage from NBC4.
Sixty-one percent disapprove of the job President George W. Bush has done. Congress got even lower marks. Seventy-two percent gave the Democratic-controlled House and Senate a failing grade.
The poll was conducted Wednesday through Sunday by telephone. The margin of sampling error is plus or minus four percentage points.
Method Used For Battleground State Poll
The Associated Press-GfK Battleground State Poll on the 2008 presidential and Senate races in Virginia was conducted by GfK Roper Public Affairs & Media from Oct. 22-26, 2008. It is based on landline telephone interviews with a state-wide representative random sample of 782 adults which included 601 likely voters.
Likely voters completed the entire questionnaire; the balance of the sample completed a shorter version of the questionnaire.
Digits in the phone numbers dialed were generated randomly to reach households with unlisted and listed landline numbers.
Interviews were conducted in both English and Spanish.
As is done routinely in surveys, results were weighted, or adjusted, to ensure that responses accurately reflect the population's makeup by factors such as age, sex, education, and race.
No more than one time in 20 should chance variations in the sample cause the results to vary by more than plus or minus 3.5 percentage points from the answers that would be obtained if all adults in Virginia were polled. The margin of sampling error is plus or minus 4.0 percentage points for likely voters.
There are other sources of potential error in polls, including the wording and order of questions.
The questions and results for this poll are available at http://www.ap-gfkpoll.com.