He was equipped, the police said, with an automatic rifle and a handgun; when the police finally got to the island — about 40 minutes after they were called, the police said — Mr. Breivik surrendered.

The police also said he had registered a farm in Rena, in eastern Norway, which allowed him to order a large quantity of ammonium nitrate fertilizer, an ingredient that can be used to make explosives. The authorities were investigating whether the chemical had been used in the bombing.

Besides the manifesto, Mr. Breivik left other hints of his motives.

A Facebook page and Twitter account were set up under his name days before the rampage. The Facebook page cites philosophers like Machiavelli, Kant and John Stuart Mill.

His lone Twitter post, while not calling for violence, paraphrased Mill — “One person with a belief is equal to the force of 100,000 who have only interests” — suggesting what he saw as his ability to act.

Those postings, along with what was previously known about Mr. Breivik publicly, aligned with but hardly predicted the bloody rampage he would undertake on Friday.

Before then, he had been a member of the right-wing Progress Party, which began as an antitax protest and has been stridently anti-immigrant and anti-Muslim.

Joran Kallmyr, a member of the party who is now Oslo’s vice mayor for transportation, said he met Mr. Breivik several times in 2002 and 2003 at local party meetings. “He was very quiet, almost a little bit shy,” Mr. Kallmyr said. “But he was a normal person with good behavior. He never shared any extreme thoughts or speech with us. There was absolutely no reason to expect that he could do something like this. We’re very shocked.”

Mr. Breivik quit the party in 2006, apparently disappointed by the party’s move toward the center.

“He didn’t like our politics, I guess, and moved on,” Mr. Kallmyr said.

His Internet posts also indicated contempt for the Conservative Party, which he accused of having given up the battle against multiculturalism.

But on Friday he directed his firepower at the center-left Labor Party, which leads the coalition government.

“Breivik feels that multiculturalism is destroying the society and that the enforcing authority is the prime minister and the Labor Party, the lead party of contemporary Norwegian politics,” said Anders Romarheim, a fellow at the Norwegian Institute for Defense Studies.

But the attacks, along with what appear to have been years of preparation for them, raised questions about whether the Norwegian security authorities, concentrating on threats of Islamic terrorism, had overlooked the threat from the anti-Islamic right.

“This is the Norwegian equivalent to Timothy McVeigh,” the right-wing American who bombed a federal building in Oklahoma City in 1995, said Marcus Buck, a political scientist at the University of Tromso in northern Norway. “This is right-wing domestic terrorism, and the big question is to what extent Norwegian agencies have diverted their attention from what they knew decades ago was the biggest threat” to focus instead on Islamic militants.

The unclassified versions of the last three Norwegian Police Security Service reports assessing national threats all played down any threat by right-wing and nationalist extremists. Instead, the reports emphasized the dangers posed by radical Islam, groups opposed to Norway’s military involvement in Afghanistan and Libya, and others.

The 2011 report, released early this year, concluded that “the far-right and far-left extremist communities will not represent a serious threat to Norwegian society.”

Even after the attacks, that appeared to be the official position.

“Compared to other countries I wouldn’t say we have a big problem with right-wing extremists in Norway,” Prime Minister Jens Stoltenberg told reporters at a news conference on Saturday. “But we have had some groups, we have followed them before, and our police is aware that there are some right-wing groups.”

Even if the authorities had focused on right-wing groups, it was unlikely that they would have noticed Mr. Breivik.

Kari Helene Partapuoli, director of the Norwegian Center Against Racism, said Mr. Breivik did not belong to any violent neo-Nazi groups that she was aware of, and his Internet postings, before those of last week, did not espouse violence.

“The distance between the words spoken and the acts that he carried out is gigantic, because what he did is in a different league of what the debates have to do about,” she said.

Arild Groven, secretary general of the Norwegian Shooting Association, a sports group, confirmed that Mr. Breivik had belonged to Oslo Pistolklubb, one of the 520 clubs in the association.

“We all read and watch the news about the shootings in the United States,” Mr. Groven said. “But it doesn’t happen here.”

Mr. Romarheim said in some ways the homegrown nature of the attack made it harder for Norwegians to accept. “With 9/11 in America, people could ask, ‘Who are they?’ and could pour their rage out on someone else,” he said. “But we can’t disavow this person, he’s one of us.”