Washington (CNN) President Barack Obama spoke by phone with Bernie Sanders on Sunday, a Democratic source told CNN.

The Obama-Sanders call came as the Democratic presidential primary neared its end, with Hillary Clinton poised to clinch the party's nomination after a spate of Tuesday contests.

Sanders has pledged to keep up his fight for the Democratic nomination through the party's convention in Philadelphia in July.

However, the White House is signaling that Obama's endorsement of Clinton could come as early as this week, with Obama officials and Democratic aides determining how and when Obama and Vice President Joe Biden would throw their full support behind their former secretary of state.

Sanders spokesman Michael Briggs, asked about the call on Monday, told reporters: "He's spoken with the President on a number of occasions at the White House and on the telephone and he doesn't discuss the nature of the conversations."

Read More