A manhunt ended Monday for a fugitive who allegedly attacked a police officer and stole his pistol a day earlier, as police found him in a mountainous area in northern Osaka Prefecture not far from the crime scene and arrested him.

Yujiro Iimori, 33, is suspected to have stabbed 26-year-old Suzunosuke Kose in the chest and legs with a knife at a police box in the city of Suita, and stole his gun early Sunday. Iimori, who carried a mental disability certificate, has denied the allegation.

"It's not something I've done," Iimori was quoted as saying by investigators. But he also made remarks suggesting that the case, which left Kose in a coma, may have happened because of his "disease."

The incident occurred as police were stepping up security in the nearby city of Osaka, where a summit of the Group of 20 major economies will be held next week. Residents and police officials expressed relief over the latest development.

Chief Cabinet Secretary Yoshihide Suga said in Tokyo the government plans to implement tighter security for the G-20 meeting, saying, "We take it seriously that such an incident occurred."

Related coverage:

Man fatally stabs policeman at police box before being gunned down

When police arrested Iimori at 6:34 a.m. in a mountain forest in Minoo, about 8 kilometers north of the police box, he was lying on a wooden bench with his head on a backpack and awake.

The stolen pistol was found inside a plastic bag under the bench. The gun was loaded with five bullets when stolen but contained four when it was retrieved.

There were signs a shot had been fired and residents near the police box reported hearing an explosive noise about 20 minutes after the attack.

Iimori had 100,000 yen ($921) in cash in his backpack when arrested. He had purchased bug spray and a smartphone charger in Minoo while he was on the run, a possible sign he was planning to hide in the mountainous area, but the items were not found when he was taken into custody, according to the police.

The police were able to quickly arrest the suspect due to swift disclosure of surveillance camera footage from near the police box, according to Akihiro Otani, a journalist who has expertise on police organizations.

According to the police, Iimori's father Mutsuhisa Iimori, an executive of Osaka-based Kansai Television Co., notified them that the man appeared to be his son, who has been living in Tokyo's Shinagawa Ward until shortly before the incident.

"I deeply apologize to the police officer who was seriously injured and his family," the father said in a statement issued Monday.

The suspect's apparent Facebook page says he graduated from public high school in Suita in 2005 before going to a private university in Tokyo.

Iimori was a seaman apprentice in the Maritime Self-Defense Force, belonging to the force between April and September 2009. He had boarded a destroyer but never handled pistols while on duty, according to a Defense Ministry source.

Between September 2015 and April 2016, Iimori worked full-time checking images at a TV program production company associated with Morioka-based Iwate Menkoi Television Co. He quit for personal reasons and there was nothing wrong related to his work, the broadcaster in northeastern Japan said.

Most recently, he was working part-time as a cleaner at a golf range in Tokyo's Ota Ward. He worked five days a week before he took days off between June 5 and 7 to visit Okinawa, according to co-workers.

Last Tuesday, he requested three days off, and later made calls enquiring about his schedule. On Saturday, he asked for shorter working hours, they said.

The stabbing shocked local residents, forcing supermarkets and libraries to close, and public events such as flea markets to be canceled. Police had called on residents to lock their doors and stay inside.

Takahisa Ishida, head of Osaka prefectural police, said in a statement, "We apologize for the great worry we have caused local residents, and appreciate the tip-offs offered to investigators."

Thirteen-year-old Kensuke Sumi said he had to remain indoors Sunday because his family told him, "You must not go outside."

A 21-year-old university student who lives near the police box said, "Now I can move about freely," while a 24-year-old civil servant said, while commuting to work, "I'm relieved. The police should make greater efforts not to have their guns taken."

Kose was apparently attacked after two officers left the police box to respond to an emergency call reporting a home break-in. A pay phone about 800 meters south of the police box was used to make the call, which police said turned out to be a hoax.

The knife used in the attack had a 15-centimeter blade, and the officer sustained more than seven wounds to the chest and other parts of his body, the police said.