Construction worker Kevin Forrence was loading up his truck one recent morning, getting ready to start his day at Gate City Fence on Ledge Street, when he noticed an unfamiliar shape on the other side of the canal.

"It was 5 a.m.; the sun wasn't out, but you could see," he said. "I just turned around, and it caught my eye. There was a black bear casually walking down the bike trail."

Forrence, 36, said he yelled out to the bear to try to make it stop, so he could get a better look and maybe capture the animal on his cellphone camera. But it was too dim, and the bear too far away. It stopped for a moment, glanced over at Forrence, and continued walking away. Later, other people reported seeing it poking into a D umpster near a Dunkin' Donuts.

"I've never seen a bear in the wild," said Forrence, who spends considerable time hiking and camping in the White Mountains. "All of a sudden, I'm in the center of Nashua, and there's a bear walking down the trail. Nashua is the last place I'd ever thought to see it."

Forrence wasn't the only one surprised by the bear's visit. There had never been a bear sighting in Nashua, as far as the experts can recall.

Eric Orff, a bear biologist with the New Hampshire Fish and Game Department for more than 20 years until he retired last month, said he had never heard of a bear sighting in Nashua. Neither has police Sergeant Sergio Hebra, who has worked in Nashua for 18 years. "We have had all sorts of wild animals -- moose, deer, coyotes, foxes -- but I don't recall seeing a bear before."

Bear sightings have also been reported in Manchester, New Hampshire's largest city (Nashua is the second biggest), and Derry, the fourth-most-populous community in the state. Residents also have reported seeing bears in Amherst, Bedford, Brookline, and Hollis, according to local police officials.

"It's a new phenomenon down there, really," said Andrew Timmins, bear project leader for the Fish and Game Department, explaining that while bears have always lived in the southern part of the state, he does not remember a year in which they have been seen in all of these densely populated centers.

In Manchester, a bear that had climbed a tree had to be tranquilized by police and carried off into the woods last month after nearly 1,000 people had gathered to watch, said Manchester's animal control officer, Dennis Walsh. In Derry, five bear sightings have been reported this year, according to that town's animal control officer, Marlene Bishop.

There are usually one or two bear sightings in Derry every year, Bishop said, and the most the town ever had was three. This year, she said, three sightings already have been reported to animal control officials, and the Police Department has logged a couple of sightings, too.

"We've never had as many bear sightings before as this year," Bishop said.

In Brookline, N.H., bears have been spotted seen at least six times this year, said Police Chief Thomas Goulden, who estimated that this is probably the most the town has had in one year.

Experts offer several explanations.

David Anderson, director of education with the Society for the Protection of New Hampshire Forests, said bear populations might be up slightly because the past two years were very good ones for acorns and beech nuts, causing bears to have good reproductive success. He said researchers who surveyed bear dens last winter found, on average, between two and three cubs per female, while in years when there is a poor tree-nut crop, female bears tend to have no offspring or one cub.

This time of year, Anderson said, is breeding season, and male bears tend to move around a lot to breed as many females as they can. The ones ending up in cities might be the "teenage" bears that are being chased off by older bears that do not tolerate other males in their territory.

"I think they are moving across the area, they are dispersing in the spring," Anderson said. "Young males are very inexperienced. . . . It's not unreasonable to expect that, as they disperse, they will move into new areas. It may be that all the best territories are being actively defended by adult-male bears."

Anderson said bear populations have been growing in New Hampshire for some time because forests, which were cut down to make way for farmland in the first half of the 19th century, have come back. Mature oak trees that produce acorns can support larger bear populations, he said.

Orff also said that the increase in sightings is related to the larger number of bears. He said the bear population in the state grew from about 1,200 bears in 1983 to 5,500 today, in part because of hunting restrictions put in place in 1985.

"There are about five times more bears now than 25 years ago," he said. "There are certainly more bears around Manchester and Nashua than there had ever been before. The probability that a bear will wander into the city is higher."

A similar scenario is playing out in some parts of Massachusetts, where the bear population is expanding at a rate of between 10 percent and 13 percent per year, with more bears being seen in urban areas, said Marion Larson, information biologist with the Massachusetts Division of Fisheries and Wildlife.

A bear was spotted in Lynnfield this spring, and other sightings have been reported in Lawrence, Newburyport, and Worcester. In Carlisle, Larson said, a bear broke into two horse barns in April, making off with a bag of grain.

Is development driving bears into the cities?

Larson and Anderson indicated that, while human population growth increases the likelihood that human-bear interactions occur, development isn't responsible for bringing bears into the cities.

"They are not in the cities because there's a lot of development," Larson said. "Manchester and Concord have been there for hundreds of years. . . . What we are finding is they're becoming intelligent about where they're finding food."

Bears are very adaptable and are becoming fond of human food, like that found in a Dumpster behind a Dunkin' Donuts, as well as sunflower seeds in bird feeders, the experts say.

"If they know where there's an easy meal to go to, they're going to go there," Larson said. "They remember from year to year. They have good memories," and are also passing this information to their young.

"They can certainly become addicted to human food," Timmins said. "They like sweet foods. . . . They're suckers for doughnuts."