A bear caused a stir in Schenectady, New York, on Tuesday morning after several local residents spotted the animal walking through the streets of the city.

The Schenectady Police Department said in a statement on Tuesday that it had received several reports of a bear traveling through the Woodlawn neighborhood of the city. The type of bear spotted was unclear. The bear later retreated to woodland.

According to the department, officers requested the assistance of the state Department of Environmental Conservation.

Local schools were notified and police advised those living in the area to stay updated on the evolving situation.

Police said they were trying to ensure that the bear stayed away from the city's main roadways and that it returned to its "natural environment."

After the bear was spotted in the Woodlawn neighborhood, police and wildlife officials tracked the animal in several other parts of the city.

Schenectady City School District officials said they were told about the bear sightings around the same time as students were arriving for class on Tuesday morning. The district decided to cancel all outdoor classes and activities.

Staff also took precautions in order to protect students in the event that the bear passed by.

Karen Corona, a district spokesperson, told Times Union: "The staff came out to quickly bring students in and to get them off buses."

By Tuesday afternoon, the bear had retreated to a wooded area of the Woodlawn Nature Preserve on the outskirts of the city and was no longer on public roadways or private property, police said.

"We are hopeful that it will continue to move on its way from the city and back into its natural habitat," police said in a statement.

Schenectady Police Department shared a video of the bear by some houses.

Bear sightings are not uncommon in the local area, a local resident told Times Union.

The animal is not the only bear to have drawn attention to itself after being spotted in an urban area recently.

In May, a black bear was spotted relaxing up a tree in the backyard of a home in the town of San Anselmo, Marin County, California.

Word of the bear's presence quickly spread around the neighborhood, located just a few blocks from downtown, with several locals subsequently gathering around the home in the hopes of seeing the animal, ABC7 reported.

The bear eventually made its way out of the tree and, with the encouragement of first responders, ran through the yard and into open space near the base of Mount Tamalpais, where police said it had been living recently and would hopefully remain.

Stock image showing a black bear. A bear was spotted roaming the streets of Schenectady, New York, on Tuesday. It was unclear what type of bear was spotted.iStock