With shootings up and pressure on the NYPD to curb the kind of policing that has made the city so safe, it’s worth thinking about what the long-term effects of a rise in crime would be.

“The first group it would affect would be people with small children,” says Alan Ehrenhalt, editor of Governing magazine.

He explains that an “important part of wanting to live in an urban neighborhood is being able to walk to get the things you need. Even being able to go out in the middle of the night. That’s a big thing.”

Yes, it’s hard to imagine all those mommies pushing Uppa strollers in Soho and Tribeca sticking around very long if they have to worry about being held up on the way to Starbucks.

Actually, it’s remarkable that, in our era of helicopter parenting, middle- and upper-class families find the city safe enough for their children.

These parents may even be loosening the leash on their kids a little, knowing how safe Manhattan is these days. But let’s just say that free-range parenting requires broken-windows policing to make it work.

“We’re so happy and comfortable in our neighborhoods these days precisely because we feel so safe,” says Julia Vitullo-Martin, a senior fellow at the Regional Plan Association. “What will happen if we start to feel less safe?”

She notes that “crime was both a cause and an effect of the post-World War II urban crisis.

“Most young New Yorkers probably think that scenario won’t repeat itself — but of course it could, especially if youngsters start getting mugged.”

Ehrenhalt was surprised by how quickly people started to return to New York after crime started to go down in the ’90s.

“The people who don’t have children are less worried about crime and more willing to take a chance on a marginal area — they go in first. That’s when you get restaurants and bars and nightlife.

“Once the area becomes more interesting, then you get some venturesome couples. And the final stage is families.”

He expected it might take decades to get to the “families” stage — when in fact it only took a couple of years.

If crime starts to rise, though, he has no doubt that people will be equally quick to leave — essentially in the reverse order. And they may not wait for statistical proof; anecdotal evidence could be enough.

“If someone close to you is mugged or injured in a robbery,” Ehrenhalt says, you’ll think about leaving.

“The first places to depopulate would be the Brooklyn and Harlem gentrification spots,” says Heather MacDonald, a Manhattan Institute senior fellow.

Tribeca might not feel the effects for a while, but “hipster Brooklyn would definitely face a political quandary:

“Are they willing to put up with what was once glamorized as ‘urban grit’ for the sake of diversity . . . or would they get the hell out when they have to start worrying about gang gunfire?”

I’d guess the latter.

And where would they go? Will home prices rise even more in Scarsdale as families flee to Westchester?

Vitullo-Martin notes that some will take more drastic options, such as moving all the way to “attractive, safe, smaller cities like Minneapolis, Madison, Austin, San Jose and San Diego.”

Whatever they do, though, it won’t be good for New York City.

Not only do upper-class families provide the city with much of its tax base, they’ve also helped make some of the city’s schools more palatable, donating a lot of resources to local PTAs, for instance.

While the policing strategies of the Giuliani-Bloomberg era were certainly responsible for much of the crime drop, MacDonald notes that the city’s demographic change “has helped keep its crime going down.

“If those demographic trends reverse themselves, it will be much harder to hold on to our crime gains.”

The future, in other words, can very quickly start to look an awful lot like the past.