President Obama tried to highlight the similarities between Democratic presidential rivals Hillary Clinton and Sen. Bernie Sanders and suggested that the differences the two contenders display on the campaign trail is merely a matter of "tactics."

During a heated primary, he said, the candidates are trying to differentiate themselves so the voters think they have a stark choice when in reality Clinton and Sanders share most of the same Democratic Party values, Obama argued.

"Bernie and Hillary agree on a lot of stuff and disagree on everything across the board that Republicans stand for," he said. "My hope is we can let the primary voters and caucus-goers have their say for a while and let's see how this thing plays out."

Obama made the remarks Tuesday during a press conference in Rancho Mirage, Calif., where he spent the last two days leading a summit of South Asian leaders.

Asked about the 2016 presidential contest and why it's far closer than expected on the Democratic side, the president also suggested that Clinton might be more closely aligned with his politics than Sanders, although he quickly added a caveat.

"I know Hillary better than I know Bernie because she served in my administration and I suspect on certain issues she agrees with me more, but there might be other areas where Bernie agrees with me more," he said.

Instead of focusing on their differences, however, he listed a litany of issues in which they agree, including economic opportunity for all, preserving Social Security and Medicare, the science behind climate change and a foreign policy "that doesn't shoot before it aims," values he said are shared by all Democrats.

"There's a broad convergence around those issues," he said. "What you're seeing right now is a difference in tactics, how do you actually get things done, how do you operate in a political environment that has become so polarized."

The president also hinted that he might wade into 2016 race and endorse a candidate, although he didn't given an indication of the timing of such a big announcement or whether it would come before the end of the primary season or afterward.

"Ultimately, I will probably have an opinion about it," he said. "Based both on being a candidate of hope and change and being a president that has some nicks and cuts and bruises over getting things done over the past few years."

"It's important for the voters to express themselves and the candidates to run through the paces," he said.

He paused before sharing an open secret with the audience: "I'm not unhappy that I'm not on the ballot" this year.

He then launched into a scathing critique of the Republican primary contest, arguing that foreign observers are troubled by some of the harsh rhetoric from many of the GOP candidates, not just Donald Trump.

"I don't think it's restricted to Mr. Trump," Obama said. "He says it in more interesting ways what the other candidates are saying as well. So he may up the ante in the anti-Muslim sentiment, but if you look at what the other Republican candidates have said … that's pretty strong too."

Singling out Sen. Marco Rubio, R-Fla., without naming him, Obama accused him of abandoning his previous sponsorship of the Gang of Eight immigration bill offering illegal immigrants a path for citizenship.

"You've got a candidate who sponsored a bill that I supported to finally solve the immigration problem and he's running away from it as fast as he can," Obama said.

Obama then began a long assault on Trump, predicting he would not wind up as the nominee because the common decency of Americans would prevail.

"I have a lot of faith in the American people, and I think they recognize that being president is a serious job," he said. "It's not hosting a talk show or reality show. It's not promotion or marketing."