Image copyright Emory Image caption The letters are affectionate, but mostly deal with Mr Obama's life as a young graduate

Angst-ridden letters from a young Barack Obama to his girlfriend reveal a 20-something plagued by insecurities about race, class and money.

The handwritten letters are between a young Mr Obama and Alexandra McNear, who he met in California as a student.

Some show the future president's early struggles, working a job he cares little for just to get by.

Acquired by Emory University's Rose Library in 2014, they have only now been published.

"They are quite beautifully composed and reveal the search of a young man for meaning and identity," library director Rosemary Magee said.

"They show the same kind of yearnings and issues that our own students face - and that students everywhere encounter."

Long distance

The letters were written between 1982 and 1984, five years before Mr Obama's first date with his eventual wife Michelle.

In one of the earliest letters, he wrote: "I trust you know that I miss you, that my concern for you is as wide as the air, my confidence in you as deep as the sea, my love rich and plentiful."

It was signed: "Love, Barack."

Image copyright Getty Images Image caption Mr Obama - pictured here in 2004 - wrote the letters while in a long-distance relationship

But the long-distance relationship did not last. By 1983, he tells her: "I think of you often, though I stay confused about my feelings."

"It seems we will ever want what we cannot have; that's what binds us; that's what keeps us apart."

Finding his path

In one letter, a young Obama writes about his friends preparing to settle down or take over the family business.

But born in Hawaii, to a father from Kenya, and spending much of his early years in Indonesia, he felt different.

"I must admit large dollops of envy," he wrote.

"Caught without a class, a structure, or a tradition to support me, in a sense the choice to take a different path is made for me."

"The only way to assuage my feelings of isolation are to absorb all the traditions, classes, make them mine, me theirs."

Image copyright Emory Image caption The nine letters run to about 30 pages of thoughts and affections

But it was not so easy.

As a graduate in 1983, returning to Indonesia where he grew up, he found that he no longer belonged there. "I can't speak the language well anymore," he said.

"I'm treated with a mixture of puzzlement, deference and scorn because I'm American - my money and my plane ticket back to the US overriding my blackness."

"I see old dim roads, rickety homes winding back towards the fields, old routes of mine, routes I no longer have access to."

Portrait of the president as a young man

The young graduate knew he wanted to work in the kind of community projects he would later champion as president - but, like many young people, had to be practical.

"One week I can't pay postage to mail a resume and writing sample, the next I have to bounce a cheque to rent a typewriter," he wrote in 1983.

"Salaries in the community organisations are too low to survive on right now, so I hope to work in some more conventional capacity for a year, allowing me to store up enough nuts to pursue those interests next."

Media playback is unsupported on your device Media caption More than 30 years later, Mr Obama paid tribute to his wife as he ended his term of office

Taking a job at publishing house Business International, he said he became "one of the 'promising young men'... with everyone slapping my back and praising my work".

But he worried the corporate job might have "dulled my senses or done irreparable damage to my values" and left shortly afterwards.

And there were other signs in his writing of who he might become. In a 1984 letter to Alexandra, he pondered what he could do with more influence.

"My ideas aren't as crystallised as they were while in school, but they have an immediacy and weight that may be more useful if and when I'm less observer and more participant," he said.