A 780-pound steer headed for slaughter in West Baltimore seized a chance at freedom Friday, leaping a barbed-wire fence and taking a brisk two-mile walk along North Avenue that ended when it was gunned down by police in Midtown.

The steer was first spotted about 10:15 a.m., police said, after escaping from George G. Ruppersberger & Sons on Pennsylvania Avenue, the oldest slaughterhouse in the city.

Scores of people were drawn to the intersection of North Charles and Preston streets to take pictures of the felled animal, and social media lighted up with pictures and fake Twitter accounts posting the supposed musings of the steer.

But witnesses also raised questions about police opening fire on the animal with people nearby.

Ellie Beziat said the steer was trotting 15 feet from her and her boyfriend when she saw an officer lean out of a moving cruiser and fire shots at its head. She said about 10 other pedestrians were in the street.

“I don’t know whether the [animal] needed to be shot, but I do know you shouldn’t be firing out of a moving police car with pedestrians standing there,” Beziat told the Baltimore Sun.

Police said the steer had become “increasingly aggressive” and that officers had been unable to contain it.

“We have to take into account the safety of the surroundings of everybody,” Sgt. Sarah Connolly, a police spokeswoman, said of the decision to shoot the steer. Police officials said they assigned the agency’s Force Investigation Team to investigate the case.

Robert Queen, a 22-year-old designer, was driving onto North Avenue from Druid Hill Avenue when he saw the animal trot by. At first he thought it was a horse that had gotten loose, perhaps from the stall of an arabber, the produce salesmen who use horse-drawn carts. Queen whipped out his cellphone and started recording as the steer strolled along.

Police said they started tracking the steer on North Avenue, and four police cars surrounded it near Eutaw Street. But the steer would not be hemmed in, said Lt. Eric Kowalczyk, a Baltimore police spokesman.

“It vaulted over the hood of a car,” he said.

Kowalcyzk said police had almost corralled the steer near Meyerhoff Symphony Hall, but it escaped again and ran into a parking garage. Police called in the large Emergency Vehicle Unit command truck, a mobile command station often used during barricade situations, to block the entrance of the parking garage and try to seal in the steer. But the animal leapt over the bumper of the truck and squeezed through an opening, Kowalczyk said.

“That was when we were left with the situation where the officer was forced to discharge,” he said.