The man is accused of going on a kidnapping and stabbing rampage in Christchurch before he was shot.
At a press conference this afternoon Canterbury Police District commander Superintendent Dave Cliff said police were still trying to find out what may have sparked the rampage.
A council worker stabbed repeatedly in the attack remained in hospital this evening in a serious but stable condition.
A woman delivery driver taken hostage had also received hospital treatment and been discharged.
She was being interviewed by police at the Sydenham police station.
Witnesses described seeing police pepper-spray, Taser, then shoot the knifeman in the suburb of Spreydon about 8am.
Earlier, Mr Cliff said it appeared the knifeman rushed at police when confronted.
Officers armed with a Glock pistol fired two shots, one hitting the local man's shoulder and the other his wrist. He was treated at the scene before being taken to hospital with injuries that were not life threatening.
Mr Cliff said a police criminal inquiry had begun, as well as an investigation by the Independent Police Conduct Authority.
He said that, from the information to hand, he believed his officers had acted correctly.
The scene, at the intersection of Hoon Hay and Halswell roads was cordoned off today.
Mr Cliff said it was not believed either of the victims had any connection to the knifeman.
He credited public assistance for preventing the situation escalating. He also praised the quick response from police.
He said 20 witnesses had come forward and he encouraged those who had any information who had not yet come forward to contact police.
Mr Cliff said the situation had reaffirmed a decision by Police Commissioner Peter Marshall to have firearms readily available to officers in a vehicle.
The officer who fired both shots at the alleged offender was experienced and had taken part in a speciality firearms training course a few weeks ago, Mr Cliff said.
Christchurch Mayor Bob Parker said he was extremely saddened by the incident. He said the council worker was an innocent bystander "in the wrong place at the wrong time".
The Christchurch Somali Community said the family of the accused man had expressed sympathy for today's incident.
In a statement, the Somali community said: "The family of the gentleman involved in the incident in Christchurch and the wider Somali community wish to express our collective sympathy to all affected by this incident. We are aware of the situation which those affected are going through and we wish them a quick recovery''.
Eye-witness accounts
Eye-witnesses described seeing police pepper-spray, taser then shoot the 27-year-old knifeman in the suburb of Spreydon about 8am.
Bruce Cameron, 60, was waiting for a lift from Christchurch Tramping Club friends when he watched the scene unfold.
He saw a female police officer shoot the "wild man in the black hoodie'' after pepper-spraying and tasering him.
"I heard a car crash and I thought I could help with some first aid.
"I walked around the corner and saw a guy with a cut neck and a wild man in a black hoodie chasing him with knives.
"That's when ... this guy with a crowbar stepped in and was stopping the guy hurting anyone else. If it wasn't for him there would've been a lot more people hurt.
"He was challenging him with the crowbar. If he lives through the gunshot injuries, he's lucky the crowbar guy didn't get him _ he was really going for him.
"He was very brave, or stupidly brave, I'm not sure. I wouldn't take on someone with two knives.
"The lady had been stabbed in the shoulder. She was okay, adrenalin-hyped and then it hit her. The cops came a bit later and pepper sprayed him and that didn't do much so the female cop tasered him. He still wouldn't go down and when he started to advance on her, she shot him twice.''
Kelvin McElroy, 40, was on his way to use an ATM when he saw a car crash into a wall on Hoon Hay Rd.
"The driver got out with two knives. He went back up towards this truck which had pulled over. The truck driver saw the guy coming at him with knives and must have thought he needed to do something to protect himself. He got a steel bar and got out and confronted him.
"They had a go in the street. The truck driver hit him in the neck real hard with the steel bar but he didn't go down. He was trying to stab him, he was wild.
"Then a police car turned up. An officer told him to put the knives down but he wouldn't so the cop tasered him. He still didn't go down.
"The cop kept saying `put the knives down, put the knives down', but he wouldn't, and then he came towards the cop brandishing the knives.
"He must have been on drugs or something, he was so pumped up. He shot him twice - bang bang - once in the shoulder and once in the stomach.
"He went down and the cops took the knives away and started first aid. I couldn't believe my eyes.
"After that an older woman who was sitting beside the road came up and hugged him. I think he must have saved her from some road rage incident or something.
"The truck driver was very brave.''
Another witness, who returned to his home on Lincoln Rd from his nightshift about 8am, saw a man bleeding badly outside about five minutes later.
"He was about 60 and in a real bad way, blood everywhere, congealing on the footpath,'' said the man, who did not want to be named.
"A cyclist and a woman in a car stopped and helped him. They put him in the front seat of her car and then the back seat.
"They were getting really agitated with time ambulance was taking. He was bleeding to death I reckon. He was unconscious.
"When the ambulance cane he got in with him and dumped his bike and helmet over my fence. Something seriously major has gone down.''