The race was tighter in the 12 states the Pew poll identified as being battlegrounds: Colorado, Florida, Iowa, Michigan, Missouri, Nevada, New Hampshire, North Carolina, Ohio, Pennsylvania, Virginia and Wisconsin.

Obama still leads among these states, but only by 4 points — 48 percent to 44 percent for Romney — and barely outside the margin of error. Previous polls by Pew since February have showed a closing gap between the two candidates in these states, with Obama so far retaining his slight lead.

The margin of error for the poll was 3 percentage points.