The 31-year-old, who was living at an asylum reception centre in Årdal, was due to be deported to Spain on Tuesday, after having his application rejected in June.
"This person had applied for asylum, and come to Norway in April," a spokesman for Norway's immigration directorate said. "He was rejected in June, and was supposed to be returned to Spain under the so-called Dublin Regulation."
The man is accused of killing the bus driver, Arve Haug Bagn (55) and Margaret Molland Sanden, a 19-year-old biotechnology student at the Oslo and Akerhus University College of Applied Sciences. The third victim, a Swedish man in his 50s, has not been named.
Police believe that the three victims were the only people on the bus when the man attacked.
Bente Dalåker, who runs the reception centre where the killer was housed, said that staff had not noticed anything unusual about him in the time since he arrived on 26 August.
"We did not notice that he could do such a thing. No one has reported that he could be dangerous," Dalåker said.
The killer was disarmed without a fight once the authorities arrived, and has been flown by helicopter to hospital in Bergen, where he is being treated for knife injuries.
The emergency services first received reports of a traffic accident involving a bus at 5.30pm. Once the fire services arrived, however, they realized that the situation was more serious.
"The bus was on the side of the road, so we stopped our car and ran over," one of those on the scene told TV2."It was impossible to open the doors."
"Then we saw a dark-skinned person inside the bus. At first, we thought he was trying to get out but then saw he was moving around with a knife, and we realized that the situation was quite different."
According to police, the man was held by firemen until 6.45pm when the first police arrived, one hour and 15 minutes after they were first notified.
"The person came out voluntarily from the bus and was arrested by the firefighters. He had already thrown down the knife," Magne Knutsen of the Årdal police told VG.
The bus, the Valdres Express, travels the four-hour journey from the mountainous region of Valdres to Oslo , nd was hijacked between the towns of Årdal and Tyin in Sogn og Fjordane county.
The attack marks the second time the Valdres Express has been hijacked. In 2003, it was hijacked by a mentally disturbed 26-year-old Ethiopian man who stabbed the driver to death.
A 2012 report from the Pew Research Centre estimated that 60.5 percent of South Sudan’s population was Christian, 32.9 percent were followers of traditional African religion, and 6.2 percent were Muslim.