By Dan Whitcomb

(Reuters) - The mayor of Los Angeles has written to the Trump administration to formally request federal assistance with the growing numbers of homeless on the city's streets, a letter that shows he and Housing Secretary Ben Carson have had negotiations on the issue.

The letter from Los Angeles Mayor Eric Garcetti to President Donald Trump, dated Jan. 9 and made public on Friday, seeks federal aid to "move our unhoused neighbors into shelter, build permanent housing" and supply services to the homeless.

"I appreciate Secretary Carson reaching out to me," Garcetti says in the two-page missive.

"During our conversation he expressed a commitment to working with cities nationwide to help accelerate our progress in addressing this emergency by investing in strong, humane and lasting approaches that can help get people off the street and save lives," Garcetti said.

The constructive tone is a sharp contrast to Trump's rhetoric on Twitter and during previous visits to California, slamming public officials for the growing homelessness crisis.

On a visit to San Francisco and Los Angeles in September, Trump said conditions including trash, defecation, and hypodermic needles left by homeless people were hurting the prestige of those cities.

Earlier this week Carson posted two tweets that also referenced talks between the city and his office, mentioning Garcetti and Kathryn Barger, chairwoman of the Los Angeles County Supervisor's office.

"The homelessness crisis in California has been an entrenched problem for a longtime. Per the request of @MayorOfLA & @kathrynbarger we look forward to a new partnership that will benefit our fellow citizens," Carson said on Twitter.

An estimated 130,000 people are homeless somewhere in California on any given day, more than any other state, according to the Department of Housing and Urban Development. California is the most populous state in the United States, home to about 39.6 million people.

In September, Carson rejected requests from California for more money from the Trump administration to fight homelessness, blaming state and local leaders for the crisis.

White House officials are said to be readying a plan to crack down on homelessness in Los Angeles and other major California cities.On Thursday California Governor Gavin Newsom announced plans to create a $750 million fund to help house the homeless and directed the state to immediately start setting up tents and trailers as emergency temporary housing.

(Reporting by Dan Whitcomb in Culver City, California; Editing by Bill Tarrant and Daniel Wallis)