PORTLAND, Maine — Democrat Barack Obama won Maine’s presidential vote on Tuesday, turning back Republican John McCain’s efforts to take at least one of the state’s four electoral votes.

Obama’s win in Maine, which has gone Democratic in every presidential election since 1988, was based on an analysis of voter interviews, conducted for The Associated Press by Edison Media Research and Mitofsky International.

Obama held a steady lead in pre-election polls but McCain hoped to grab at least one of Maine’s four electoral votes by focusing his efforts in the state’s 2nd Congressional District.

Maine and Nebraska are the only two states that divide electoral votes by congressional district.

Story continues below advertisement.

In Maine, that meant McCain could win one electoral vote if he pulled out a victory in the 2nd District, a rural district that is thought to be the more conservative.

McCain advertised heavily in the district and sent his running mate, Sarah Palin, and her husband there in hopes of swaying voters. But the scenario of split electoral votes has never occurred in nearly 40 years that the current system has been in place.

Even before Election Day, the state set a record for number of absentee ballots — about 227,000 — and election officials said the total number of votes cast was expected to set an all-time record.

Many voters said they wanted change.

“Everything’s a mess. The country’s a mess. Nothing’s going right. It has been eight years of chaos,” Richard Yarnold said after voting for Obama in Portland.

David Silk, another Obama supporter, said that while he likes McCain on a personal level, he no longer trusts Republicans to manage the country’s affairs.

“Eight years ago, I would’ve voted for him, but the party has run the country into the ground. If they were CEOs, they would’ve been fired a long time ago,” he said.

Not everyone supported Obama, however.

Erlene Stuart said Obama reminded her of a bright-eyed graduate — full of ideas but lacking in experience. Thus, she gave her vote to McCain. “I feel like he has the wisdom, and he has been tested, and he can reach across party lines,” she said.

The scenario of Maine dividing its electoral votes has long intrigued political observers, especially four years ago when President Bush was seeking re-election against Democrat John Kerry, but it has never happened since the system was put in place in 1969.

Maine began its slide toward blue state status after 1988, when summer resident Republican George H.W. Bush won the state. Four years later, the tides had changed. Democrat Bill Clinton carried Maine and Bush came in third, behind independent Ross Perot.