LOS ANGELES — Parents who pick up their children at the bus stop in this city’s Harbor Gateway neighborhood say they often see men wearing GPS ankle bracelets and tell their children to stay away. Just up the street, 30 paroled sex offenders live in a single apartment building, including rapists and child molesters. More than 100 registered sex offenders live within a few miles.

So local residents and city officials developed a plan to force convicted sex offenders to leave their neighborhood: open a tiny park.

Parents here, where state law prohibits registered sex offenders from living within 2,000 feet of a school or a public park, are not the only ones seizing on this approach. From the metropolis of Miami to the small town of Sapulpa, Okla., communities are building pocket parks, sometimes so small that they have barely enough room for a swing set, to drive out sex offenders. One playground installation company in Houston has even advertised its services to homeowners associations as an option for keeping sex offenders away.

Within the next several months, one of Los Angeles’s smallest parks will open here in Harbor Gateway, on a patch of grass less than 1,000 square feet at the corner of a busy intersection. But even if no child ever uses its jungle gym, the park will serve its intended purpose.