TOKYO — A suspect in a rare fatal shooting in Japan ended an 18-hour standoff with police Wednesday by shooting himself in the stomach, and was taken to a hospital where he reportedly died.

Police said Yasuhide Mizobata was the main suspect in a shooting Monday at a small construction company in Wakayama in western Japan in which one employee was killed and three others were injured, one seriously. The motive for the attack is not known.

Police said Mizobata, 45, was spotted near the murder site on Tuesday night but when officers approached him, he fired four shots at their police car, shattering its windows, and escaped. No one was injured.

He holed up in an apartment early Wednesday with two handguns, beginning a standoff that received widespread media coverage in a country where gun crime is rare. Television reports showed riot police in bulletproof vests and helmets standing downstairs while police tried unsuccessfully to persuade him to surrender.

All residents of the apartment building were safely evacuated by police.

Mizobata shot himself in the stomach shortly before riot police stormed in to capture him, Wakayama police said.

He was hospitalized and died about two hours later, media reports said.

In his exchanges with a police negotiator, the suspect asked police to bring him food and beer and deliver 2 million yen ($19,400) in cash to his mother, Kyodo News reported.

A bag he left behind in the apartment contained the cash and a letter, Kyodo said. It said police also found a knife, syringes and small plastic bags, in a possible sign of drug use.

National Police Agency statistics show there have been fewer than 10 shooting deaths each year in Japan in recent years, a number that dropped to just one case in 2015.