Former South Bend Mayor Pete Buttigieg, the first openly gay presidential candidate, is dropping out of the Democratic race for the White House.

Just after 6 p.m. EST on Sunday, campaign sources told multiple news outlets that Buttigieg was quitting the race.

"He believes this is the right thing to do right now for our country and the country to heal this divided nation and defeat President Trump," a campaign aide told CNN. "He decided that now was the time and, I think that is exactly why he is getting out. He believes this is the right thing to do."

Buttigieg narrowly won the Iowa Caucuses over socialist Sen. Bernie Sanders, although it was essentially a toss-up. Buttigieg then placed second in the New Hampshire primary, third in the Nevada Caucus, and fourth in the South Carolina primary.

Despite the strong start, Buttigieg was unable to build a diverse base of supporters, which he would have needed to secure the Democratic nomination and be competitive on the national stage against President Donald Trump.

Buttigieg campaigned as a moderate alternative to Sanders and Sen. Elizabeth Warren, the race's most progressive candidates, but Joe Biden's strong showing in South Carolina — where he won nearly 50 percent of the vote — showed that the former vice president would be moderate Democrats' preferred candidate.

The announcement came just hours after Buttigieg vowed to stay in the race, claiming that "pushing forward is the best thing we can do for the country and for the party."