The missing Japanese boy abandoned by his parents has been found alive, officials said.

Seven-year-old Yamato Tanooka was found in the military barracks near Shikabe town in the northern part of Hokkaido, a few distances from where he was left by his family on Saturday.

According to a report from BBC, Tanooka's parents had confirmed the boy's identity.

The search teams, which included the Japanese Self-Defense Forces (SDF), have been extensively searching the forest, which is home to a species of wild bears, for almost a week. However, they were unable to locate the missing boy.

But on Friday, at around 7:00 am, military personnel found Tanooka in a one-story wooden hut on a military exercise area located in the town of Shikabe, which is about 5 km away from where he was last seen, or roughly 7 km when traversing the forest paths.

According to a news agency in Japan, the SDF official was on a drill when he found the boy, who was curled up in the mattress and had no prominent external injuries. The boy introduced himself as Yamato Tanooka, the official said.

In a report published in The Guardian, the boy told the police that he had walked to the hut within the military area and taken shelter there on Saturday night, the same day he went missing. He is said to have had access to water, although he had no food.

According to an SDF spokesperson, the boy appeared to be in good health, but he was sent to the hospital via medical helicopter.

In an interview with local news, the boy's father Takayuki Tanooka said he had apologized to his son as soon as they were reunited in the hospital in the city of Hakodate.

Tanooka's parents initially told police that the boy got lost while picking vegetables in the forest. They later admitted to leaving the boy in the woods as a punishment for misbehaving. When they returned for him shortly afterwards, he had disappeared.

Tanooka's father told local media that he was "very sorry" for the child and "for causing trouble for many people."

According to local officials, Tanooka's parents could face charges for negligence.

Over 180 rescuers had been searching for Tanooka in the past week, with the Japanese military finally joining the search on Wednesday after days of fruitless searching.