President Barack Obama at a news conference in the Brady press briefing room at the White House in Washington, on November 14. AP Photo/Andrew Harnik President Barack Obama told reporters Sunday that he was not concerned he might be the last Democratic president.

But the president, speaking with reporters at an economic-cooperation summit in Lima, Peru, did acknowledge that the Democratic Party had some soul-searching to do.

"I am not worried about being the last Democratic president … not even for a while," Obama said at a news conference. "And I say that not being cute — the Democratic nominee won the popular vote, and obviously this is an extremely competitive race, and I would expect that future races will be competitive."

Earlier this year, when a Donald Trump victory still seemed a long shot, George W. Bush said he feared he would be the last Republican president. The comments prompted a Fox News reporter to ask Obama on Sunday whether he felt the same way about his party since the tables had turned and Republicans had control of the presidency, both houses of Congress, nearly two-thirds of state legislatures, and more than 30 governorships.

"I certainly think it's true that politics in America right now are a little bit up for grabs," Obama said. "That some of the old alignments in both parties, Democrat and Republican, are being reshaped. Democrats do have to do some thinking about how do we make sure that the message we have is received effectively and results in winning elections."

Reports of infighting in the Democratic Party began surfacing in the days after Trump's surprise win in this month's presidential election. Party leaders are preparing for years of self-examination.

Obama suggested that the Democratic election strategy of "micro-targeting" specific demographic groups — like the black and Hispanic voters that were crucial for Democratic nominee Hillary Clinton — may not be the most effective strategy.

"One message I do have for Democrats, that a strategy that's micro-targeting particular discrete groups in a Democratic coalition sometimes wins the election, but it does not win you the broad mandate you need," Obama said.

He added: "And the more we can talk about what we have in common as a nation and speak to a broad set of values, a vision that speaks to everybody, and not just one group at a time, the better off we will be."