Minnesota’s long-serving legislator battled all of Saturday to win the DFL’s endorsement — and preserve a political career that has spanned more than 40 years — over an opponent vying to be the first Somali-American representative at the State Capitol.

But 12 hours after the convention began, none of the candidates won enough delegates to secure the nomination.

Rep. Phyllis Kahn, a trailblazing feminist in state politics, consistently came in far behind her main challenger, Ilhan Omar. But Omar fell just shy of the 60 percent of delegates needed to triumph, even after five ballots.

Frustration and exhaustion dominated the mood as roughly 250 delegates cast ballot after ballot, failing to resolve the deadlock.

A third-place candidate, Mohamud Noor, was forced to drop out after the second ballot because he could not win enough support, but he threw a wrench into the contest when his delegates voted not to endorse a candidate. If they had left the room, or moved to Omar’s side, Omar would have crossed the threshold for endorsement. But the numbers barely moved over hours of voting.

As of the fifth ballot, Omar had 55 percent of the delegates, Kahn had 33 percent, and 12 percent — Noor’s supporters — voted not to endorse a candidate. Omar needed just 11 more delegates.

Clamors of protest arose when the announcer said there would be no endorsement, minutes before 10 p.m. “Shame on you!” one woman yelled.

“I’m pushing on the fact that we need an endorsement,” said David Gilbert-Pederson, chair of Omar’s campaign and also DFL chair of the Senate 60B district. “Our resources should not be spent fighting a primary.”

“We’re ahead in delegates and I think it’s time at this point for people to help us get to 60 [percent],” he said.

Kahn and Omar had said they would abide by an endorsement. But with none coming, a three-way primary seemed probable.

Just before the fourth ballot, audience members on the convention floor in Northeast Middle School began chanting, “Endorse Ilhan!”

Kahn’s last race in 2014 also saw a convention in which no candidate was endorsed. She came shy of the 60 percent threshold in her bid against Noor, forcing a primary election in which she barely won.

“We all know that this is the year of change, the year of challenging the establishment. … Well, guess what?” Kahn said, her voice loud and forceful, during her pitch to delegates. “I’ve been challenging the establishment before the day I was elected, and I’m still at it.”

As each candidate approached the podium to address the crowd, Omar drew the loudest and most enthusiastic reception.

Her campaign has said she would be the first black Muslim woman to hold legislative office in the United States. Born in Somalia, Omar and her family escaped civil war when she was a child. She lived in a refugee camp in Kenya for four years and ultimately moved to the Cedar-Riverside neighborhood of Minneapolis, where she has lived for nearly two decades.

Omar is a political activist who is the director of policy initiatives at Women Organizing Women. She lives with her husband and three children.

“The same individuals have been making decisions for us at the Capitol for a really long time,” Omar told the delegates. “Some of the things they are doing are not working. So many of us are being left behind.”

Kahn touted her decades of experience, saying she had worked on legislation to give more money to schools, raise taxes on the wealthy, restore cuts to higher education, ban smoking, freeze tuition at the University of Minnesota and legalize same-sex marriage in Minnesota.

“I don’t just talk about things,” she said. “I do them.”

All three candidates said they support raising the minimum wage to $15 an hour and instituting paid sick leave. They support improving opportunities for people of color and increasing investment in education.

Noor said he wants to improve opportunities particularly for black men like him.

“I was recently told, ‘You’re a black male; you’re not going to be elected by the white people,” he said. “I take offense to that.”

The convention began at 10 a.m., but the portion devoted to Kahn’s race did not start for six hours, as procedural matters and the endorsement contest dragged on for the district’s Senate seat, where incumbent Kari Dziedzic faced a challenge from Chris Meyer.