The 2016 presidential election will soon draw to a close after months of sexual assault allegations, heated policy discussions and what has been described as one of the ugliest debates in modern U.S. history. There seems to be one winner already: President Barack Obama.

Obama is enjoying his best approval ratings and his growing popularity could be attributed to the 2016 election season in which the U.S. is picking from two of its most disliked presidential candidates ever. A recent Gallup poll shows that 55 percent of Americans approve of Obama’s performance in the White House. His ratings are better than most presidents since World War II had in the period just before an election. And he is likely only on the way up from here. Presidents’ ratings usually show a spike right before their successor takes over, so there are chances Obama will leave the Oval Office with even better ratings.

A recent CNN poll also found that 54 percent of Americans believe the country is doing well and 46 percent of Americans are unhappy with the state of affairs. This is a reversal from late July, when polls found 54 percent of Americans thought the country was doing badly.

The latest report from the Pew Research Center found Obama’s ratings had gone up by 8 points since 2016 began and is at its highest since December 2012. The report attributes this spike to better ratings from Democrats, 90 percent of whom say Obama is doing a good job. Independents also approve of Obama’s performance as commander-in-chief, with 52 percent giving him a good rating, an uptick of nine points since January.

Republicans’ views on Obama remain largely unchanged, with only 11 percent giving him a good review.

After endorsing the Democratic nominee Hillary Clinton, Obama has spoken out against her rival Donald Trump on multiple occasions, calling the real estate mogul “unfit to be president.

“There have been Republican [presidential candidates] with whom I disagreed with, but I didn’t have a doubt that they could function as president,” Obama said at a recent joint press conference with Singapore Prime Minister Lee Hsien Loong. “I think what [GOP leaders] have to ask themselves is, if you are repeatedly having to say, in very strong terms, that what he has said is unacceptable, why are you still endorsing him? What does this say about your party, that this is your standard-bearer?” 

Trump, who is lagging behind Clinton in national polls, is facing an enormous backlash after a 2005 video of him making lewd comments about women went public. Since the video aired, multiple women have come forward and accused the 70-year-old of sexual assault.

Meanwhile, controversy over Clinton’s use of a private email server as secretary of state refuses to die down and continues to play a major role in shaping voters' outlooks. And the transparency group WikiLeaks has in recent weeks published a series of hacked emails that reveal the workings of the Clinton campaign.

All this scandal has seemingly helped Obama look good in comparison. But his high approval ratings aren't unprecedented Bill Clinton and Dwight Eisenhower beat Obama’s numbers in their final months in office, with 58 percent approval ratings each.