Sikh religious leaders led prayers and hymns, while mourners, some sobbing and embracing, looked upon the open caskets of the members of the Sikh community killed five days ago by Wade Michael Page, who then turned a gun on himself.
In the gym, which is about two miles (3.2 km) south of the Sikh Temple of Wisconsin where the shooting occurred, US Attorney General Eric Holder told mourners: "Last Sunday morning, this community witnessed the very worst of humankind. But for every minute, every hour, and every day since then, you have exemplified and inspired the very best in who we are."
Mr Holder said he attended the memorial "with a heavy heart" on behalf of US President Barack Obama and all Americans.
"The love people in America have shown us has strengthened our resolve," said Dr. Manminder Singh Sethi, a temple member who helped usher mourners to seats. "This was an isolated case. We are a simple living people."
"My heart goes out to the family of the assailant too," Dr. Sethi added. "That life was also a life lost."
Wisconsin Governor Scott Walker, addressing the gathering, also praised the response of the Sikh community to the shootings.
"As Americans we are one. When you attack one of us, you attack all of us," Mr Walker said. "This week, our friends and neighbours in the Sikh community showed us the best way to respond is with love."
Some mourners wore turbans in white, yellow, black and blue. Others wore white baseball caps or simple white wraps as they made their way forward toward the caskets amid a large police presence.
Satwant Singh Kaleka, the 65-year-old president of the congregation, was killed in Sunday morning's shooting as were Sita Singh, 41; Ranjit Singh, 49; Prakash Singh, 39; Paramjit Kaur, 41; and Suveg Singh, 84.
"It's an honour to share this space and time with you," Amardeep Kaleka, son of the temple president who was killed, said to the mourners.
Kamal Saini, whose mother was killed in the shooting, said the gym represented all religions.
"As I look around, I don't just see Punjabis or Hindus or Christians or Jews," Mr Saini said. "I see everybody, we are all one here today."
Amandeep Mahel, 35, a temple member, said afterward that the public memorial was part of the healing process and his interest in attending temple services only increased after the shooting.
"Because of way they lost their lives, it struck me right in the middle of the heart," Mr Mahel said.
Page, 40, a US Army veteran with links to racist groups, also seriously wounded three others on Sunday, including a police officer. Another officer shot Page in the stomach and he then shot himself in the head, authorities said.
The temple reopened on Thursday after an exhaustive search by authorities investigating the attack. Investigators have not determined why Page targeted the Sikh temple.
Dozens of vigils for the victims have been held throughout the United States this week, organised by communities and by religious leaders of several faiths. In neighbouring Minnesota, flags at government buildings were ordered to half-staff on Friday in observance of the services.
The line of mourners had curled through the gym and outside.
"It's beautiful that everyone is coming together," said Milwaukee resident Aaron Reeve, who held his 5-year-old son's hand as they stood in line waiting to enter the gym.
"He's only five, but I think it's important for him to see how people get together and that everyone is the same," he said.