After nearly a day and failed rescue attempts by the Washington Fish and Wildlife Department, a black bear finally came down from a tree near a Renton elementary school.

The bear stayed in one tree and then another for about 20 hours overnight Wednesday into Thursday.

See close-up photo of the bear here.

The bear climbed down the first tree after 10:30 p.m. Wednesday, but then clambered up another one. Wildlife officials left Wednesday night, thinking that the bear could come down on its own. It eventually came down at 3:20 a.m. Thursday and ran into the woods.

Crews were called around noon Wednesday to the tree, which is in a park with a tennis court about a block from Highlands Elementary School. Children were kept inside at recess and were released slightly earlier than usual.

Animal control officers tried to shoot bean bags at the bear in hopes of bringing it down and tranquilizing it. Officers use the tranquilizer only when bears are closer to the ground, so they were unable to use tranquilizer darts while it was in the tree.

Wildlife officials wanted to get the nearly 200-pound bear down from the tree and relocate it away from the neighborhood, but they were not at the scene overnight.

>> Read more trending news

The animal control officers' efforts appeared to make the bear climb higher in the tree. It fell down several limbs just before 5 p.m. Wednesday, then again tried to climb higher in the tree.

KIRO 7 News spoke to Nadine Drisseq of King County's "Bear Smart" program, who said that during the spring season, the bears are losing calories until berries become available. The bear likely came for food, but it scurried up the tree out of fear.

“There were garbage (cans) all around,” Drisseq said. “I think people have taken them in now. It’s garbage day, and he’s been lured here.”

Drisseq's Bear Smart program worked on a 2016 study that looked into residential garbage bins attracting bears.

The study claims that once a bear gets a taste of human garbage, it can become "food conditioned" and continue a habit of searching for food in garbage cans.

According to the study, the so-called "food conditioning" is dangerous for both the community and the bear, which can become more aggressive in its search for food.

Sightings of bears are reported across the eastside region from Bothell down to Auburn, especially at homes near densely wooded areas.

The statewide black bear population in Washington likely ranges between 25,000 and 30,000 animals. Bear attacks are rare, although the chances of being injured by one multiply in the backcountry.