A 20-year-old man was given a sentence topping 27 years for wounding three women with a flurry of gunfire at a backyard birthday party in Minneapolis last year, the Hennepin County attorney’s office announced.

Prosecutors alleged that Delonte A. Thomas, of Minneapolis, opened fire in the north Minneapolis home because attendees sang “Happy Birthday” to the guest of honor but neglected to do the same for his girlfriend.

Last month, jurors deliberated for three hours and convicted Thomas of one count of first-degree attempted murder and three counts of second-degree attempted murder in the July 9, 2014, shooting.

Thomas’ defense sought a term of slightly more than 16 years, while Assistant County Attorney Michael Radmer told Hennepin County District Judge Nicole Engisch that Thomas deserved to have all of the sentences run consecutively, which would have meant a term exceeding 40 years.

With credit for time served awaiting trial, Thomas’ sentence Monday of 27-plus years means he could leave prison after a little more than 17 years and finish his time on supervised release.

According to the criminal complaint and testimony at the trial: Police were called to the home in the 3500 block of Fremont Avenue N. at 1:30 a.m. to find the three women on the ground in the backyard with “significant” wounds.

Witnesses said Thomas and a woman identified as his girlfriend were attending a birthday party when a fight broke out after the partygoers sang “Happy Birthday” to the guest of honor. Thomas said it also was his girlfriend’s birthday, and he suggested they sing to her. A woman objected.

Thomas left the party, returned 20 minutes later with a handgun and entered the backyard from the alley. He ran toward the woman who had objected and fired multiple shots. He shot her nine times in the arms, leg and back. Another woman was shot eight times, including once in the center of her chest.

A third woman told police she had just stepped outside to join the party when she heard gunfire. She was struck eight times in the legs.

“Everybody makes mistakes, and everybody deserves a second chance,” Thomas said in court Monday, when given the opportunity to speak. “I’m the peacemaker; I’m the one to try my best to make it through a situation. I don’t recall having a gun. I don’t recall shooting [anyone]. I just hope to get some type of mercy here.”