After hearing the second shot go off, the man ran away from the area in shock and called emergency services.
Detective Sergeant Mike Smith said two local people, a 30-year-old man and 29-year-old woman, had been arrested after the shooting which happened on Dixon St about 9pm Sunday. They would appear in the Masterton District Court today.
A woman received serious wounds to her leg after the shooting and was in hospital recovering from surgery.
The firearm had been located, but police were seeking more people who witnessed the event and believed the people involved were known to each other, Smith said.
A spokesperson for Wairarapa Hospital said after the incident the hospital went into lockdown before the patient was airlifted to Wellington.
Police remained in the town throughout the evening and locals told the Herald a helicopter was flying over with a spotlight around 10.30pm.
Another local said she heard two loud bangs around 9pm and told the Herald she knew they were gunshots.
"They were very loud and quite apparent that they were gunshots," she said.
"I went outside and saw a woman walk past who said 'did you hear that too?' She was on the phone to the police already.
"I could hear yelling in the distance. The yelling could be heard for about five minutes I'd say ... I did not hear any sirens though."
The witness said he was in shock following the incident and it was the last thing he thought would happen on his walk home.
"You don't expect it and don't think it will happen," he said.
"It's stuff you see in movies and video games and stuff. It didn't feel real."