The armed assailant was a young, white male carrying several guns, and he had expressed far-right, anti-immigrant views online, assistant chief of police Rune Skjold told a news conference.
The suspect, whose home is near the mosque, had expressed far-right, anti-immigrant views before the attack, police said earlier.
A gunman who opened fire at a mosque outside Oslo, Norway on Saturday was thwarted by a 65-year-old congregant who put him in a chokehold.
The incident comes almost eight years after Norway's deadliest peacetime attack, when anti-Muslim neo-Nazi Anders Behring Breivik massacred 77 people at a camp.
Later, a woman was found dead at the house of the suspect.
The 21-year-old is suspected of murder and violation of anti-terrorism legislation, the NRK broadcasting company reported.
The man suspected of shooting at people inside a Norwegian mosque on Saturday, and of killing his stepsister, appeared in court on Monday with black eyes and wounds on his face and neck.
Norway has been grappling with the fear of rising extremist violence tied to immigration at least since 2011, when an attacker killed 92 people in a bombing and mass shooting.
Police attend the scene after a shooting inside the al-Noor Islamic center mosque in Baerum. The weapons are believed to be connected to the suspect.
The authenticity of the post or the exact identity of its author has not yet been established.
"Nothing indicates that there have been more people involved".
Local Norwegian paper Budstikka said it had contacted the mosque in March after the Christchurch massacre and that officials there had said security would be tightened.
Prosecutors had requested a maximum pre-trial detention period of four weeks on charges of murder and terrorism, citing the ongoing investigation.
On Sunday, Solberg wrote on Facebook that the latest attempted attack was an assault on all Muslims in Norway, an attack on freedom of religion and "an attack on Norway".
Trine Skei Grande, Norwegian Minister of Culture, said that "we need to make sure that people are safe in mosques and other rooms of God".
Speaking to press outside a nearby hotel on Sunday, Mr Rafiq, who was preparing to celebrate the Islamic festival of Eid al-Adha, said: 'I'm thankful for all of the help and support I have received'.
- Reporters Leave Out Trump’s Condemnation of Neo-Nazis in Stories About Biden Confrontation
- Yankees To Play White Sox On The Field Of Dreams
- Top smartphones for gaming
- Death toll from India floods rises to 95, hundreds of thousands evacuated
- Oil dips amid trade worries, Opec expectations cut more support
- Escaped convict from Tennessee could have left the state
- Review of Plarium's Browser MMO Game Stormfall: Age of War
- Frank Lampard reveals conversations with David Luiz
- Volatility in China's yuan due to escalating US trade friction - PBOC official
- United States billionaire Jeffrey Epstein kills self in jail