Los Angeles Mayor Eric Garcetti on Tuesday restricted city employees from cooperating with federal immigration officials and instructed police at the ports and airports to refrain from investigating a person’s immigration status.

The directive expands to other city agencies the existing policies of the Los Angeles Police Department—which since 1979 has prohibited officers from determining immigration status. Since 2014, the LAPD has also refused to honor requests from federal immigration officials to detain illegal immigrants...