SANTA ANA (CBSLA) — The move began Tuesday for hundreds of homeless people, who will be forced to leave a large encampment in the Santa Ana riverbed to shelters or motels on the orders of a federal judge.

An estimated 400 transients are still left at the riverbed encampment from a population that swelled to more than 1,000 at one point.

READ MORE: LIVE UPDATES: Funeral Underway As England Mourns Loss Of Prince Philip

Social workers have gotten many of the encampment’s population into alternative housing. But a group remained, forcing a showdown in federal court last week between the county — which wanted to open up the biking and hiking trails to the public again — and homeless activists who wanted to make sure the transients didn’t end up on a criminal merry-go-round as they bounced from city to city running afoul of anti-camping ordinances.

The move started this morning on the north end at Taft Avenue and Ball Road. Social workers will be on the scene to do intake surveys and advise transients of their options, while Public Works officials will help with trash disposal and carry belongings to a storage area.

Transients will have the option of going to area shelters, where services like health care are available, but if those beds run out, they will have the option of taking motel vouchers, along with food vouchers. They’ll also be offered transportation to shelters and motels, according to Orange County sheriff’s spokeswoman Carrie Braun.

“I think progress will be slow and methodical,” she said.

READ MORE: 2 Long Beach Grocery Stores Shutting Down Saturday Over Hero Pay Law

The temporary housing is being offered as part of an agreement brokered in part by U.S. District Judge David O. Carter to resolve litigation over county and municipal efforts to clear the Santa Ana riverbed encampment.

Under an agreement with homeless advocates, the county will provide temporary housing and work to find permanent solutions for the homeless, who will have to move out of the encampment by Tuesday.

Homeless advocates had sued over plans to clear the camp, arguing there was nowhere for the transients to go.

Carter toured the encampment last week with county and other officials, who began notifying people living there that they will have to vacate the area.

MORE NEWS: Armed Suspect Caught On Camera Robbing Group Of People In A West Hollywood Alley

(© Copyright 2018 CBS Broadcasting Inc. All Rights Reserved. City News Service contributed to this report.)