Masanori Aoki, 31, was arrested under a court warrant on suspicion of murder in Nakano, a city in Nagano prefecture, police said on Friday.
Mr Aoki is believed to be the eldest son of Masamichi Aoki, the speaker of the city assembly in Nakano.
A witness told NHK public television that a woman fell while being chased by the suspect, who then allegedly stabbed her with a knife and shot at two police officers as they arrived at the scene on Thursday.
The man's attack on his first victim had been carried out with a 30cm long blade, witnesses said.
"I killed her because I wanted to," the suspect was quoted as saying when an eyewitness asked why he stabbed her.
A fourth person – an older woman – who sustained injuries, could not be rescued because he was near where the suspect was holed up. She was found dead early Friday, police said.
Mr Aoki, wearing a camouflage uniform, a hat, sunglasses and a mask, opened fire on police officers who responded to the emergency call.
The suspect later barricaded himself inside his father's home with his mother and aunt for at least 12 hours.
During the standoff, TV footage showed police wearing bulletproof vests and carrying shields, with an ambulance nearby. Police sealed off a 300-metre radius around the house, and city officials urged people in the quiet farming neighbourhood to stay home or at an evacuation centre, where about 80 people reportedly took shelter.
Mr Aoki was described by his neighbours as a quiet grape farmer who owned a popular gelato shop.
Nagano prefectural police chief Iwao Koyama offered condolences to the victims and said the loss of two police officials is "extremely regrettable". He noted that the suspect allegedly shot a police officer in the left chest with a hunting rifle.
Mr Aoki allegedly stabbed to death the 66-year-old woman with a survival knife, the police chief said.
National Public Safety Commission chair Koichi Tani said that the suspect had licenses for multiple hunting and air guns authorised by the prefectural public safety commission
Authorities are investigating his gun usage records and that they plan to take necessary safety measures based on investigation results, the chair said.
The suspect's mother and aunt escaped uninjured.
The two slain police officers have been identified as Yoshiki Tamai, a 46-year-old inspector, and 61-year-old sergeant Takuo Ikeuchi, according to Japan Times.
Violent crimes are rare in Japan due to strict gun control laws. However, in recent years, there have been some high-profile cases involving random knifings on subways and arson attacks amid growing concerns about homemade guns.