A man was critically injured in a shooting just outside of the Hotel Captain Cook in downtown Anchorage early Sunday morning, Anchorage police said.

The trouble began with a large party inside one of the guest rooms of the hotel, which led other guests to complain that it was "out of control," said Anchorage Police Department spokeswoman Anita Shell.

"It started with a person who was a registered guest and invited a couple friends over and people just started showing up," Shell said.

Security arrived at the room and asked the crowd -- reportedly more than 40 people -- to disperse. As partygoers exited the hotel around 3:45 a.m., shots erupted in the street, and a 20-year-old man was shot in both his left and right thighs, leaving him in critical condition, police said.

He was taken to a local hospital. The victim's name has not been released.

Shell said detectives are trying to piece together what happened and don't know whether the shooting was random or if the shooter targeted the victim. Police aren't saying whether they believe the shooter was part of the rowdy party that spilled out of the room.

Witnesses are being interviewed, Shell said.

"There were lots of witnesses," she said. "Most of which were people clearing from the room."

A woman who answered the phone at the Hotel Captain Cook Sunday said she had "no information" to share and would not comment on the incident.

No suspect or vehicle descriptions had been released by APD as of Sunday night.

Anyone with information on the crime is asked to call police at 786-8900 or contact Crime Stoppers at 561-STOP.

The shooting is the latest in a string of unsolved violent incidents involving gunfire in Anchorage over the last couple of months.