A 21-year-old man killed a Wisconsin couple in a scheme to kidnap their teenage daughter, then held the girl captive for nearly three months before she managed to escape and reach safety as he drove around looking for her, authorities said.

Jayme Closs, 13, was skinny, dishevelled and wearing shoes too big for her when she approached a stranger and pleaded for help on Thursday in the small, isolated north woods town of Gordon, where police said she was being held by Jake Thomas Patterson.

Within minutes, Patterson was pulled over and jailed on kidnapping and homicide charges for what authorities said was his meticulously planned shotgun attack at the girl's home in October.

The news that Jayme was safe set off joy and relief 96km away in her hometown of Barron, population 3,300, ending an all-out search that gripped the state, with many people fearing the worst the longer she was missing.

"My legs started to shake. It was awesome. The stress, the relief - it was awesome," Barron County Sheriff Fitzgerald said, describing the moment he learned Jayme had been found.

Jayme told one of the neighbours in Gordon who took her in that she had walked away from a cabin where she had been held captive.

"She said that this person's name was Jake Patterson, 'he killed my parents and took me'," said another neighbour, Kristin Kasinskas. "She did not talk about why or how. She said she did not know him."

The sheriff said investigators are trying to figure out what happened to Jayme during her captivity and why she was seized, and gave no details on how she escaped except to say Patterson was not home at the time. He said there is no evidence Patterson knew Jayme or her family or had been in contact with her on social media.

"I know all of you are searching for the answer why any of this happened," Fitzgerald said. "Believe me, so are we."

The sheriff said that he did not know if Jayme had been physically abused but that she was admitted to a hospital overnight for observation and released. Investigators were still interviewing her, and she was "doing as well as circumstances allow", he said.

Kasinskas called 911 to report the girl had been found after another neighbour out walking her dog encountered Jayme and brought her to Kasinskas' home. Patterson was apparently out looking for her when he was stopped by a sheriff's deputy based on a description of his vehicle from Jayme, authorities said.

He was scheduled for an initial court appearance on Monday. It was not immediately known whether the unemployed Patterson had a lawyer.

Jayme's grandfather, Robert Naiberg, said he had been praying for months for the call he received about his granddaughter.

"I thought, 'Good for her she escaped'," he said.

Jayme disappeared from her home near Barron after someone blasted their way in and shot her parents, James and Denise Closs, on October 15. The sheriff said investigators believe Patterson killed them in order to abduct the girl.

Patterson took such measures as shaving his head beforehand to avoid leaving evidence at the scene, the sheriff said. A shotgun was recovered from the home where Jayme was believed held, according to Fitzgerald.

Property records show that the cabin belonged to Patterson's father at the time of Jayme's disappearance.

Patterson worked for one day in 2016 at the same Jennie-O turkey plant in Barron as Jayme's parents, Jennie-O Turkey Store President Steve Lykken said. Patterson quit, saying he was moving from the area, Lykken said. But the sheriff said it did not appear Patterson interacted with the couple during his brief time there.

He had no criminal record, according to the sheriff. He graduated in 2015 from Northwood High School, where he was on the quiz bowl team and was a good student with a "great group of friends," said District Superintendent Jean Serum.

Kasinskas said she taught Patterson science in middle school, but added: "I don't really remember a tonne about him."

"He seemed like a quiet kid," she said. "I don't recall anything that would have explained this, by any means."

The woman who first spotted Jayme on Thursday, Jeanne Nutter, said she was walking her dog along a rural road when a girl called out to her, grabbed her and revealed her name.

"She just yelled, 'Please help me! I don't know where I am! I'm lost!'" Nutter, a social worker who spent years working in child protection, told the Associated Press news agency.

Nutter took her to the home of Peter and Kristin Kasinskas. Jayme was quiet, her emotions "pretty flat", Peter Kasinskas said. From what she told them, they believed she was in Gordon, a logging town of about 650 people, for most of the time she was missing.

Over the past few months, detectives pursued thousands of tips, watched dozens of surveillance videos and conducted numerous searches for Jayme, including one that drew 2,000 volunteers but yielded no clues.

"It was only a few months ago that we as a community gathered to pray for Jayme's safe return at Barron High School," Barron County District Attorney Brian Wright said on Friday. "God has answered those prayers."

In November, the sheriff said he kept similar cases in the back of his mind as he worked to find Jayme, including the abduction of Elizabeth Smart, who was 14 when she was taken from her Salt Lake City home in 2002. Smart was rescued nine months later after witnesses recognised her abductors on an "America's Most Wanted" episode.

Smart said in a telephone interview that Jayme's story is "why we can never give up hope on any missing child".