The man suspected of shooting at people inside a Norwegian mosque, and of killing his stepsister, has appeared in court with black eyes and wounds on his face and neck.

Police are initially seeking to hold Philip Manshaus in custody for four weeks on suspicion of murder and breach of anti-terrorism law.

Manshaus, who briefly smiled at photographers, does not admit to any crime, his lawyer said earlier on Monday.

Eyewitnesses said Manshaus entered the al-Noor Islamic Centre with several guns, but was overpowered by a 65-year-old member of the mosque, who managed to wrestle away his weapons in the fight that followed.

Manshaus did not speak while reporters were present, but smiled several times.

"He is exercising his right not to be interrogated," his defence lawyer Unni Fries, told Reuters. "He is not admitting any guilt."

Manshaus, a 21-year-old living near the mosque just outside the Norwegian capital, had expressed far-right, anti-immigrant views before the attack, police said earlier.

Online postings under Manshaus' name, made shortly before the attack, expressed admiration for the massacre at two New Zealand mosques in March by a suspected right-wing extremist, in which more than 50 people were killed.

Reuters could not independently verify that the postings were made by Philip Manshaus.

A judge is expected to rule later in the day on the police request to formally detain him, the Oslo District Court said.

Police are seeking to hold Manshaus on suspicion of murder, as well as of breaching anti-terrorism law by spreading severe fear among the population.

"The prosecuting authority will request that the person charged be remanded in custody for four weeks, with a ban on visits and communication, without access to the media and in solitary confinement," the police said in a statement.

"The investigation is still in an early phase and the suspect has not made any statements to the police."

Norwegian Prime Minister Erna Solberg on Sunday said that while her government tries to combat hate speech, more must be done.

"We are trying to combat this, but it's a challenge. I think it's a world-wide challenge in a sense," Solberg said.

Any formal charges in the case, and a trial to decide whether Manshaus is guilty or not, are likely to still be months away.

A guilty verdict on charges of breaching anti-terrorism laws can carry a sentence of up to 21 years in prison, as can the killing of the suspect's 17-year old stepsister, according to Norwegian sentencing guidelines.