David Cameron has been examining how Los Angeles deals with the problem of street gangs.
David Cameron met LA police officers on his trip
The Conservative leader spoke to senior officers from the Los Angeles Police Department, the city's mayor, Antonia Villaraigosa, and former gang members.
Earlier in his trip he met California Governor Arnold Schwarzenegger.
Mr Cameron said the city was trying to deal with similar issues as those faced in the UK and he was looking at what could be learned from their strategies.
On the three day trip Mr Cameron also saw an educational project for people from deprived backgrounds, designed to try to prevent them joining gangs.
Gang violence rising
Los Angeles has had a major problem with gangs for decades and is one of the crime capitals of the world.
In the 1970s rival gangs the Bloods and the Crips terrorised neighbourhoods in the south of the city.
Today, dozens of gangs operate with hundreds of members and police say more then half of all murders in the city are gang-related.
Last year, gang violence rose by 14%.
Mr Cameron said the UK could learn from the authorities in Los Angeles but acknowledged the UK did not have problems on the same scale.
"I think this is a place to come to understand how bad problems can get with gangs and understand what the police and other authorities can do to deal with that," he said.
"Our problem in the UK is not as bad as in the US, of course it isn't.
"But it is getting worse and we need to know what works, what we can get the police to do and what we can get society to do and families to do to make sure we deal with our gang problem and deal with it now."
On Thursday, Mr Cameron's talks with Mr Schwarzenegger focused on guns and gangs, along with the environment.
Earlier this week Mr Schwarzenegger unveiled new measures designed to bring down levels of gang violence.
He gave judges the power to order parents of gang members to attend anti-violence classes.
Another new law will make it easier to have gang members evicted if they are caught with a weapon in apartment buildings used as hang-outs.
Mr Cameron says he shares a vision with the California governor
Mr Cameron has been seeking closer links with Mr Schwarzenegger for some time.
The former film star was invited to address the Conservative Party conference in Blackpool earlier this month but could not appear in person due to political commitments.
Speaking to the Guardian ahead of his flight home to the UK on Friday evening, Mr Cameron said he hoped to emulate the governor.
"My wife said to me: 'How are you going to explain to an American audience what sort of Conservative you are?' I said 'I'll say look at me and think of Arnold Schwarzenegger'."
Mr Cameron added: "He's a very impressive politician. He's achieved huge amounts in California because he's had to work with a Democratic legislature, so he's very good at making compromises, making deals, getting things done.
"His analysis of US politics is very sharp."