A woman was knifed on Thursday as she was paying at the till and the suspect, a 20-year-old Russian man, was arrested soon after, police said.
"The man said under questioning that he wanted to kill several people and that this was an act of terror," PST head Benedicte Bjoernland told a news conference.
The suspect had arrived in Oslo on Thursday, traveling from Russia via neighboring Sweden, she said. There were no other suspects.
Police were investigating possible links to Islamist extremism, Bjoernland said, adding that the victim was critically ill in hospital.