Police on Saturday stormed an apartment in a Tokyo suburb and took into custody a gangster who had holed up there after he shot and killed a fellow mobster.
The incident came just days after the fatal shooting of the mayor of Nagasaki City, which stunned the nation and prompted calls for greater gun controls.
The gangster was found bleeding from his head with a gun lying on the floor, police said.
"We are putting him in an ambulance and taking him to hospital," a police official said.
No hostages had been taken in the incident, which ended after 15 hours during which police in riot gear had stationed themselves outside the apartment while a senior gang member urged his henchman to surrender.
Police officials said the 36-year-old gangster had fired nine shots from the apartment, with one hitting a police vehicle, but no one had been injured.
They said they believed the suspect earlier had fatally shot a fellow gangster outside a convenience store in a nearby city.
A senior member of a crime syndicate spoke to the gunman on the phone and urged him to surrender, domestic media said.
"I would like to express my apologies by killing myself," the gunman was quoted as saying before he stopped answering his mobile phone.
Japan has strict gun control laws and legal firearms are mostly in the hands of hunters and police.
Illegal firearms are mostly in the hands of "yakuza" gangsters, whose mainstays include prostitution, drugs, extortion and even finance.
The shooting of Nagasaki Mayor Itcho Ito by a gangster on Tuesday prompted lawmakers, including Prime Minister Shinzo Abe, to call for even tighter supervision.
"The incidents involving guns followed the fatal shooting of the Nagasaki mayor and it is truly regrettable and grave," Chief Cabinet Secretary Yasuhisa Shiozaki told reporters.
The government is set to hold a task force meeting on gun control next week, and media reports have said it aimed to submit a bill to parliament to revise gun control legislation by the end of the current session on June 23.
Gun-related crimes have been rare and on the decline, and the number of shootings fell to a record-low 53 last year, with most involving members of organised crime. Of those, 36 were thought to have involved gangsters. Only two resulted in deaths.
Former senior police official Yutaka Takehana said the recent shootings reflected a decline in the strength of the gangs.
"Their organisations have been weakening and suffering therefore they have tended to rely on firearms," he told public broadcaster NHK, adding that many of the gangs were in financial trouble.