LOS ANGELES | A tough-talking, muscular Los Angeles police sergeant steadily rattled off tips to a young Marine riding shotgun as they raced in a patrol car to a drug bust: Be aware of your surroundings. Watch people’s body language. Build rapport.

Marine Lt. Andrew Abbott, 23, took it all in as he peered out at the graffiti-covered buildings, knowing that the lessons he learned recently in one of the city’s toughest neighborhoods could help him soon in the war against the Taliban in Afghanistan.

“People are the center of gravity and if you do everything you can to protect them, then they’ll protect you,” he said. “That’s something true here and pretty much everywhere.”

Lt. Abbott was among 70 Camp Pendleton Marines in a training exercise that aims to adapt the investigative techniques the LAPD has used for decades against violent street gangs to take on the Taliban more as a powerful drug-trafficking mob than an insurgency.

The Marines hope that learning to work like a cop on a beat will help them better track the Taliban, build relationships with Afghans leery of foreign troops, and make them better teachers as they try to professionalize an Afghan police force beset by corruption.

The troops believe they can learn valuable lessons from the LAPD, which has made inroads into communities after highly publicized abuses, from the videotaped beating of Rodney King to corruption in an anti-gang unit.

“Their role is to win the hearts and minds of the community and that’s what they did,” said Marine Staff Sgt. Brendan Flynn, who also works as a Los Angeles police officer and will be deployed to help train Afghan police.

The weeklong exercise — unbeknownst to the public — involved Marines dressed in jeans and T-shirts observing drugs busts, witnessing prostitution arrests and even following a murder case. It was the largest group of Marines to embed with the city’s officers.

During their afternoon together, police handcuffed a bus driver — moments after he was caught by an undercover officer with $25,000 worth of crack cocaine outside an apartment complex in a south-central Los Angeles neighborhood long plagued by violent gangs.

The tattooed suspect wearing an earring and baggy shorts seemed a world away from the ragtag, Kalashnikov-toting Taliban fighters, just as the streets of south-central Los Angeles are from the dusty villages of mud-brick houses in Afghanistan.

But in many ways, police in Los Angeles’ crime-ridden neighborhoods use the same skills that Marines say could help them.

Marines are in charge of training Afghanistan’s army and police but often have no police experience themselves. Their success in building effective police forces is considered key to stabilizing the country and allowing foreign troops to withdraw.

Marines also are changing their approach, realizing that marching into towns to show force alienates communities. Instead, they are being taught to fan out with interpreters to strike up conversations with truck drivers, money exchangers, cellular-phone sellers and others.

The rapport building can net valuable information that could even alert troops about potential attacks.

Marines can gather intelligence by picking up the notebooks, receipts and other papers left behind in raids that could provide insight into the opium business the Taliban uses to buy their weapons, Afghan expert Gretchen Peters said.

She told Marines before the Los Angeles patrols that they should follow the lead of some Afghans who have gone from using the term “mujahadeen” or “holy warrior” to identify the Taliban to calling them gangsters.

That, she said, shows how fed up the villagers are with being extorted by them and calling them gangsters will win them over.

“Think of the Taliban as the Sopranos in turbans,” she said. “I think essentially they’re criminals.”