An Eden Prairie man who brandished a handgun during a confrontation with young Somali-Americans inside a McDonald's last fall pleaded guilty to one count of felony terroristic threats on Thursday, a move that ensures a lifetime firearms ban.

Lloyd Johnson, 55, will be formally sentenced on April 29 but is expected to serve at least three years of probation and up to 90 days in the county workhouse. A secondary charge of carrying a pistol without a permit will be dropped at sentencing.

"We are pleased that Mr. Johnson is taking responsibility for his outrageous behavior," said Hennepin County Attorney Mike Freeman. "Because he has no criminal record, probation is the recommended sentence. Perhaps the best part of the sentence is he can no longer possess a gun, which means we will all be safer."

The Nov. 19 encounter began as Johnson was standing behind two young Somali-American women at the fast-food restaurant on Prairie Center Drive in the heart of the suburb's sprawling retail district.

The women were trying to pay for their food with a digital app on their smartphone, but it was not working. Johnson told them to hurry up, then accused them of trying to use government-funded food assistance.

Jihan Abdullahi, 17, told the Star Tribune last fall that she confronted Johnson over the perceived ethnic slight.

"As [we] are walking away, the man says under his breath, 'You were paying with EBT; that's why it didn't work,' " Abdullahi recalled.

Abdullahi said she responded, " 'Just because I'm black you think my friends and I live under EBT?' And he said, 'Yes.' "

A 45-second video that went viral on Twitter starts at some point after several young people got into an argument with the man. The video shows a teenage boy and the man pushing each other before the man stumbled backward and out the door.

At that point, the teenagers quickly backed away, and several people shouted that the man was holding a gun. A gun cannot be seen in the video.

In court Thursday, Johnson admitted that he pulled a semi-automatic pistol from his jacket pocket while arguing with the teens and held it at his side. He also told the judge that he did not plan to make any self-defense claim.

"Insulting and then terrorizing anyone is never acceptable," said Jaylani Hussein, executive director of the Council on American-Islamic Relations, Minnesota chapter.

"The justice system must come down hard on these reckless purveyors of hate so the consequences are clear to those who would follow in their footsteps."

Staff writer Paul Walsh contributed to this report.

Liz Sawyer • 612-673-4648