Suspected gunman Philip Manshaus appears in court, in Oslo, Norway, Monday, Aug. 12, 2019. A suspected gunman accused of an attempted terrorist attack on an Oslo mosque and separately killing his teenage stepsister "will use his right not to explain himself for now" in a detention hearing, his defense lawyer said Monday. Photo: Cornelius Poppen, NTB scanpix via AP.

Stockholm  - The Norwegian man accused of carrying out a shooting at a mosque near Oslo at the weekend will be held in pre-trial detention for the maximum period of four weeks, a court says, ruling in the prosecutors' favour.

The 21-year-old man denies the charges against him and had petitioned the Oslo district court for his release during a closed-door hearing on Monday.

"He has not admitted criminal charges," his lawyer Unni Fries told reporters. "He has exercised the right not to explain himself."

A summary of the proceedings released by the court supported that account.

Prosecutors had requested a maximum pre-trial detention period of four weeks on charges of murder and terrorism, citing the ongoing investigation.

They also cited fears that the suspect would tamper with evidence, witnesses or possible accomplices.

The suspect was charged with murder after the body of a young woman, identified as his 17-year-old stepsister, was found late Saturday in his home in Baerum.

The suspect is accused of carrying out Saturday's shooting at the Al-Noor Islamic Centre mosque in Baerum, west of Oslo. Several shots were fired in the shooting, but no one was seriously injured.

Television images from the Oslo district court showed the suspect with two black eyes and what appeared to be scratch marks on his face and neck. He smiled at the cameras as he calmly sat down next to Fries.

The suspect's injuries likely stemmed from Saturday's attack, when he forced his way into the mosque but was overpowered by two members of the mosque.

After the man entered the court room, Judge Sven Olav Solberg ordered a closed-door hearing after considering a prosecution request.

The defence did not oppose an open court hearing, the court summary said.

Hans Sverre Sjovold, head of the security service PST, told reporters at PST headquarters in Oslo that authorities had received a tip-off about the suspect a year ago. At the time, no further action was considered necessary, he said.

Norwegian media outlets have reported that the suspect posted a message praising mass shootings at two mosques in Christchurch, New Zealand, in March, a few hours before the mosque attack in Baerum.

He is also believed to have supported the man accused of fatally shooting 22 people at a shopping centre in El Paso, Texas, earlier this month.