(CNN) -- A 32-year-old Norwegian man was in custody, officials said Friday, after two attacks earlier in the day that killed at least 17 people -- attacks police said are definitely linked.
The first attack occurred when a massive bomb erupted in the heart of Oslo; the second occurred at the ruling Labour Party's youth camp on an island outside the capital.
At least seven people were killed in Oslo, and 10 were killed on Utoya Island, about 20 miles away, officials said.
Police spokesman Are Frykholm told CNN that the man arrested on the island appeared to match the description of a person who was seen near the government buildings shortly before the bomb erupted.
The man was wearing a police emblem on his blue sweater, though he does not work for police, Frykholm said.
At least 10 people were seriously wounded in the Oslo explosion, he added.
Oslo University Hospital reported receiving 11 people wounded by the attack in the capital and eight others wounded in the camp shooting.
The prime minister, whose office was badly damaged in the Oslo blast, leads Norway's Labour Party, which runs the youth camp, where about 700 people were in attendance on Friday.
People at the camp said the man arrived Friday on the boat that ferries visitors across the 3/4-mile of water from the mainland and told campers that he was carrying out a security check, Labour Party member Bjorn Jarle Roberg-Larsen told CNN.
"After just a few minutes, he took a handgun and started to shoot people," Roberg-Larsen said. "A panic broke out; people tried to hide; some jumped into the water and tried to swim ashore."
Others took shelter in caves or bushes or climbed trees. "And he went after them," the party member said. "Unfortunately, a lot of people are wounded and also a lot of people are dead."
The acting national police chief, Sveinung Sponheim, told reporters in Oslo that the gun was an automatic weapon and that undetonated explosives were found on the island after the attack.
The vast majority of the Labour Party youth movement attendees were between the ages of 16 and 22, though some were as young as 13 and others as old as their early 30s, Roberg-Larsen said. They had been planning to attend political training classes and participate in group activities during the day and sleep in tents at night, he said.
Citing Norwegian broadcasters, he said that the man was stopped by Norwegian police.
Though casualty figures were not clear, Roberg-Larsen said the nearest hospital was asking donors to give type O blood, the most common type.
"It's a bad day for Norway," he said. "We have never had any terrorist attack on Norwegian soil before. Today, we have had two. So people are completely shocked."
Foreign Minister Jonas Gahr Store, a Labour Party member, said he had visited the camp on Thursday. "There was political discussion, there was joy, there was everything that is associated with a political youth camp."
He said that the fact that the suspect is a blond Norwegian man should underscore the importance of allowing police to do their work before drawing any conclusions. "We've seen in Europe in recent years that politicians have been jumping to conclusions about suspects before investigations have been conducted, and we will not commit that error."
Friday's events will have an enduring influence on Norway, but will not fundamentally change the country or what it stands for, he predicted.
"Today, free government was attacked, freedom of association was attacked, the spirit of youth was attacked. But we will kick back and say that these are values that are dear to us, and we intend to defend them and Norway will be recognizable tomorrow as the Norway our friends and partners around the world have known so far."
Oslo Mayor Fabian Stang said it was a "terrible day" for Norwegians.
Prime Minister Jens Stoltenberg was not in his office at the time of the blast and was not hurt, officials said.
Nick Soubiea, an American-Swedish tourist in Oslo, said he was fewer than 100 yards from the blast, which he described as deafening. "It was almost in slow motion, like a big wave that almost knocked us off our chairs," he told CNN. "It was extremely frightening."
He said the streets filled with people trying to get away from the city center. "There are people running down the streets, people crying, everyone's on their cell phones calling home," he said.
Several buildings in Oslo were on fire, smoke billowing from them, he said.
Walter Gibbs, a journalist with Reuters, said one explosion appeared to have occurred on an upper floor of a main government building; every window on the side of the building had been blown out.
The blast also severely damaged the Oil Ministry and left it in flames, he said.
A U.S. official said it was too soon to tell what caused the explosion or whether it was a terrorist attack. The possibility of terrorism is always a concern because of the ongoing threat from al Qaeda to launch attacks in Europe, the official said.
But others appeared to have concluded that it was indeed terrorism.
In brief remarks to reporters from the Oval Office, U.S. President Barack Obama extended his condolences to the victims of the violence in Norway, saying the incidents are "a reminder that the entire international community has a stake in preventing this kind of terror from occurring."
Heide Bronke, a U.S. State Department spokeswoman, said Washington was monitoring the situation but did not have any word of U.S. casualties.
British Foreign Secretary William Hague also condemned the attacks.
"We condemn all acts of terrorism," he said. "The UK stands shoulder to shoulder with Norway and all our international allies in the face of such atrocities."
British Ambassador to Norway, Jane Owen, told CNN she was working in the embassy when she felt the blast three miles away. "The whole building shook here in the embassy," she said. "It was quite a sizeable explosion and a huge shock. ... The results demonstrate that it was a very large bomb."
She added, "As we have all experienced, you can never be totally prepared for the horror and the tragedy that unfolds when you do have a major terrorist incident and that is, unfortunately, what the people of Oslo and Norway are now having to cope with."
Stoltenberg, who has been prime minister since October 2005, heads a coalition government comprising the Labour Party, the Socialist Left Party and the Centre Party.