For Obama, the biggest group - 4 in 10 - said his policies help the middle class, with the poor coming in a close second.

Voters tended to think the U.S. economic system as a whole generally favors the wealthy.

Nearly two-thirds of voters said they thought illegal immigrants working in the United States should be offered a chance to apply for legal status, instead of being deported.

In a race that's been neck-and-neck for months, about 1 in 10 voters said they'd only settled on their presidential choice within the last few days or even on Election Day.

The survey of 19,728 voters was conducted for the AP and the television networks by Edison Research. This includes preliminary results from interviews conducted as voters left a random sample of 350 precincts nationally Tuesday, as well as 4,389 who voted early or absentee and were interviewed by landline or cellular telephone from Oct. 29 through Nov. 4. Results for the full sample were subject to sampling error of plus or minus 2 percentage points; it is higher for subgroups.

Associated Press writers David Dishneau in Hagerstown, Md., and Todd Richmond in Sun Prairie, Wis., contributed to this report.