Half of Minnesotans are happy with the job President Obama is doing as he heads into his final months in office, according to a new Star Tribune Minnesota Poll.

The poll found that 50 percent of Minnesotans approve of Obama’s job performance, and 44 percent do not approve. The poll has a margin of error of plus or minus 4 percentage points.

Obama’s approval ratings in Minnesota mirror similar polls around the country, where the two-term Democrat has seen his approval ratings climb in recent months, signaling that he could finish his term as one of the most popular presidents in recent history.

The poll comes in the final weeks of an extraordinary and bruising campaign, with results suggesting that Obama remains more popular than the two candidates vying to replace him, Democrat Hillary Clinton and Republican Donald Trump.

“I think that with the mess [President] Bush and [Vice President Dick] Cheney left, he has done a very good job,” said Marlin Toft, 88, of Ivanhoe.

Obama’s strongest approval comes from voters in Hennepin and Ramsey counties, where 60 percent of respondents approve and 33 percent disapprove of the president’s job. Obama’s support slips in the outer-ring metro suburbs, with 47 percent approving and 48 percent disapproving. In outstate Minnesota, 44 percent approve of the president’s job and 50 percent do not.

The poll shows Obama’s areas of support are similar to the geographic and gender split found in the race between Clinton and Trump. The former U.S. Secretary of State leads the New York real estate mogul 44 percent to 38 percent in Minnesota, a lead based largely on her overwhelming support in the Twin Cities and among women.

Obama is most popular among women and young people, according to the poll of 625 registered Minnesota voters taken last week. Among women, 54 percent approve of his job and 38 percent do not. Among men, 45 percent approve and 52 percent disapprove.

Millennials overwhelmingly like his job performance. His popularity drops below 50 percent among middle-aged voters, according to the poll conducted Sept. 12 to 14. Among those over 65 and older, more than half approve of how well he is doing.

The Rasmussen Reports daily Presidential Tracking Poll on Tuesday showed 47 percent of likely U.S. voters approve of his job performance, with 52 percent disapproving. Gallup pegged Obama’s approval rating at 52 percent earlier in September.

Two-term presidents rarely depart office with the highest approval of their careers. Republican George W. Bush, who served two terms before Obama, had a 90 percent approval rating in September 2001, right after the 9/11 terrorist attacks. But he saw his job approval rating plunge to 25 percent in October 2008, just as he was leaving office, according to Gallup.

The historic unpopularity of Trump and Clinton could be boosting Obama’s popularity, said University of Minnesota Humphrey school researcher Eric Ostermeier.

“President Obama may not be seen by the average voter as one of our greatest presidents,” said Ostermeier, author of the Smart Politics blog. “But they are comparing and are a bit fearful of what replaces him.”

Reflecting the deep polarization in the presidential race 47 days out from the election, poll respondent sentiments about Obama break mostly along party lines.

Among DFLers, 88 percent approve of Obama’s job and 6 percent disapprove. Among Republicans, 11 percent approve and 84 percent disapprove. Obama does slightly better among independents, with 42 percent liking how he is doing and 50 percent saying they don’t approve of his job.

Vivian Sutch, a self-described “angry white woman” from St. Paul, said she thinks Obama has done a horrible job and has overstepped his bounds with executive orders that sidestep the authority of Congress. “He’s very divisive,” said Sutch, 69. “He has divided us all up into Black Lives Matter, Occupy Wall Street, Muslims this, homophobia, Islamophobia.”

Elizabeth Workinger, 80, from Edina, said she approves of Obama’s job performance, but she wishes he could have done more to get the country out of the wars in Iraq and Afghanistan and more to help the economy after the recession.

“I had great, great hopes, but he came in at a terrible time and I don’t know if he could have done any better,” Workinger said.