WASHINGTON, DC – Barack Obama was just beginning to enjoy himself. He’d been itching to throw himself into the 2016 presidential race and do what he could to ensure that Donald Trump wouldn’t succeed him as President of the United States. It was evident throughout the campaign that he backed his former secretary of state, Hillary Clinton, but he had to wait to declare his support openly until it was certain that Senator Bernie Sanders couldn’t beat her at the convention.

His entry into the campaign came at a time when 56% of Americans approve of his performance – the highest level in a long time. In 2014, his approval rating dipped to a low of 40%, owing to public discontent with the economy and the Islamic State’s gains in Iraq and Syria. Democrats running for re-election that year deliberately avoided joint appearances with him; now, they clamor for his attendance at their campaign events.

The first scheduled campaign appearance of Obama and Clinton together was postponed because of the massacre at a gay nightclub in Orlando. It was rescheduled for July 5, the day, it turned out, that James Comey, Director of the Federal Bureau of Investigation, unexpectedly held a morning press conference on the FBI’s investigation into Clinton’s handling of State Department emails on her personal server. While Clinton had been “extremely careless” in handling classified material, Comey said, there wasn’t enough evidence of criminal intent to indict her.

Though it takes days to set up a presidential appearance, conspiracy theorists – and Donald Trump, perhaps the “conspiracy theorist in chief” – had a field day. Obama, they concluded, was part of an elaborate plot – of which there is no convincing evidence – to let Clinton off the hook legally, and that the campaign appearance was orchestrated to distract people’s attention from Comey’s harsh comments.

Campaigning with Clinton in Charlotte, North Carolina, Obama appeared to be a very happy man, loose and funny. And why not? He’s about to be liberated from the burden of the presidency. (That burden is apparent in how Obama’s hair has turned almost entirely gray since 2008.) And now, as he prepares to leave office, his approval rating stands as a powerful rebuke to the Republicans, who have tried to block him at every turn for the last eight years.

Then, a week later, Obama had to make his 11th trip as president to a US city – this time Dallas – to comfort a community shaken by gun violence and the country’s racial divide. The murder of five policemen there occurred during a demonstration – one of many held across the country – to protest the recent deaths of two black men shot to death by police after they were detained for minor infractions.

Police violence against African Americans has been commonplace; but widespread use of smartphones, with their ability to record high-quality video, has suddenly made such episodes a frequent feature of the news cycle. As it happens, Dallas has a model police force, reformed after being one of the most out-of-control in the country, and the murders of the policemen, carried out by a lone former serviceman with apparent mental problems, took place as officers mingled easily with the demonstrators.

Obama has had to struggle with America’s racial divisions, and the killing of innocent African Americans, almost since the beginning of his presidency. He’s understood since his youth that he couldn’t come across as an “angry black,” even to his white mother. Indeed, following the arrest in 2009 of Henry Louis Gates Jr., a well-known Harvard professor, as he was trying to enter his own house, Obama’s criticism of the police backfired. Many also objected when he sympathized with the parents of Trayvon Martin, a teenager shot dead by a self-appointed neighborhood watchman in Florida.

As Obama has been forced over the course of his presidency to find his voice on racial tensions and mass murders, he has made some of the most moving speeches of his presidency. His anguish – whether for predominantly white schoolchildren gunned down in their Connecticut classroom by a disturbed white youth, or a group of African Americans murdered at their Charleston church by a white neo-Nazi – has clearly been genuine. And his frustration at his inability to move the US Congress to pass meaningful gun control measures – owing to implacable opposition from the powerful National Rifle Association and its mostly Republican allies – has been as palpable as it is understandable.

Growing appreciation of Obama nowadays may reflect the shortcomings of Clinton and Trump – the most disliked presidential candidates in US history. But it’s also true that Obama has conducted himself throughout his presidency with confidence, dignity, and a sure wit. He hasn’t embarrassed the country. Indeed, there hasn’t been a tone-deaf moment in his two terms in office.

As the presidential campaign approaches the November election, the Republicans will of course continue to attack Obama. But, barring some unforeseen development, it’s possible that he will remain the country’s most popular political figure until he leaves office. And then he will be missed.