Updated

A gunman opened fire outside an under-21 nightclub in Portland, killing two girls and wounding seven other people before shooting himself in what police say might have been a random act of violence.

Detective Mary Wheat, a police spokeswoman, said the shooting does not appear connected to gangs, and there was no indication the man had a relationship with any of the people he shot in front of The Zone nightclub late Saturday. A stray bullet hit a man outside a neighboring bar.

Police late Sunday identified the shooter as Erik Salvadore Ayala, 24. He remained in critical condition at Legacy Emanuel Hospital after shooting himself in the head, Wheat said.

Wheat said investigators are trying to determine the shooter's path to the club, but it does not appear he had been inside it or the nearby bar beforehand. Police seized a car in downtown Portland that is associated with Ayala.

Police have recovered the gun used in the shooting, Wheat said.

"At first blush, this incident appears to be a random act of violence, of the kind that makes you despair for America," said Chief Rosie Sizer of the Portland Police Bureau. Sizer described the shooting as "unprecedented" for the city.

Ashley L. Wilks, a 16-year-old from Portland, was killed. The other fatal victim has not been identified, but Miguel Velasquez of the Peruvian Consulate in Seattle said she was a 17-year-old girl from Peru in an exchange program. He said her host family lives in White Salmon, Wash.

Autopsies were performed Sunday, but the results have not been released.

Both girls were part of a group of exchange students at The Zone to celebrate a birthday, said Chuck Itoh, chairman of the Rotary District 5100 exchange program. The Portland girl planned to study abroad next year in France or Spain.

Wilks' stepfather, Randy Thiesen, told The Oregonian that the family is not ready to talk about the shootings: "We're just shocked. We're not doing good."

Matt Utterback, the principal of Clackamas High School, said in a letter to parents that Wilks was a bright and curious student who enrolled in honors classes and competed on the swim team.

Ashley's counselor and teachers describe her as "an awesome student with a beautiful smile," the principal said. "She was the kind of person that lights up a room. A truly wonderful, delightful kid."

He identified a critically injured student as Susy De Sousa, an 18-year-old foreign exchange student from Italy.

"This random act of violence has cut short a young life and threatened another," he said. "Such a horrific act is impossible to accept or understand."

Monday is a scheduled day off at the high school, but counselors will be available for those in need.

Two of the shooting victims were treated and released, police said. The others remain hospitalized, with only the alleged gunman and one other person in critical condition.

Scott Bieber, the youth protection officer for the exchange program, said other injured young people were from Ecuador, France, Guatemala and Taiwan.

"Our hearts and our sympathies, thoughts and prayers go out to the victims' parents for their loss," Bieber said. "But it just kind of makes it harder to fathom when the whole purpose of this program is to foster peace and goodwill and understanding around the world."