Imagine you head to lunch with a “friend” who has forgotten his wallet and he asks you to pick up the tab.

Next, imagine that your friend does the same thing every day and never pays you back. But he always invites you to lunch.

That’s the kind of “friend” local law enforcement officials have in the federal government when it comes to immigration enforcement right now.

Via the inaccurately named Secure Communities program, federal immigration officials have asked local jails to lengthen stays for people suspected of violating the immigration code — and localities must pick up the tab.

As a result, valuable local police resources are distracted from combating crime and innocent immigrants who are not a public safety threat are caught in the web of poorly designed enforcement programs.

Our law enforcement officials can ill-afford friends like these — and now, California is on the verge of doing something about it. The state Senate has passed the TRUST Act, with the assembly likely to follow suit before the end of the month.

The TRUST Act would help keep Secure Communities within its bounds — and set an example for the rest of the country. It would focus the cooperation of local law enforcement with federal immigration efforts such that people could be detained for extra time in local jails, pending transfer to immigration authorities for deportation, only if they have been charged with or convicted of a serious or violent felony.

The bill recognizes that hardworking new Americans’ confidence in law enforcement is essential to our public safety. That’s just common sense.

The mile-wide-inch-deep nature of Secure Communities has ensnared American citizens such as Antonio Montejano, born in Los Angeles and still a resident of the city. In November 2011, he was wrongly held for four days after being charged with misdemeanor petty theft, under $50. He was freed only after the American Civil Liberties Union sent his passport and birth certificate to Immigration and Customs Enforcement.

Haphazard and harsh enforcement measures are bound to entangle the wrong people, not only U.S. citizens but also aspiring citizens who pose no public-safety threat.

Trust and an open line of communication between police and crime victims and witnesses are essential to the safety of our communities. Putting immigrant survivors of domestic violence into deportation proceedings — another example of Secure Communities gone wrong — sabotages the trust and silences the communication.

Also in California, an undocumented domestic violence survivor called police only to be taken to jail with her alleged abuser because police were suspicious of a mark on his cheek. Then she was turned over to immigration authorities. Thanks to the expensive, ineffective Secure Communities program, a call for help from a survivor of abuse put her at risk for deportation.

California isn’t alone in seeking a new approach. A slew of localities already have taken similar steps to focus local-federal cooperation, including Santa Clara County, San Francisco, Cook County, Ill., the District of Columbia and Taos County and San Miguel County in New Mexico.

Passage of the TRUST Act and similar measures will not just strengthen community policing, but also provide powerful encouragement for the federal government to put its own immigration house in order.

Instead of aggressively outsourcing immigration responsibilities to local police, our political leaders — in Congress and the administration — must pick up the reins and steer us toward immigration policy that supports the rights and freedoms of all of us.

In the meantime, once the TRUST Act emerges from the California legislature, Gov. Jerry Brown should sign it into law. In doing so, he will make Californians safer and their communities stronger. And local law enforcement officials won’t feel like they’re always paying for lunch.

Ali Noorani is Executive Director of the National Immigration Forum.  

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino