Bradley Manning will wake up tomorrow, at a military base in Virginia, to his 189th day in custody for the alleged leak of more than 250,000 diplomatic cables to WikiLeaks.

Manning, 23, a US army intelligence analyst brought up in the Oklahoma Bible belt and west Wales, is locked up with about half a dozen others in the marine-run facility in Quantico. He has had access to TV news and briefings from his lawyer, but little can have prepared him for the fury of the government he served about the impact of the cables leak.

Hillary Clinton, the secretary of state, said it "tore at the fabric of government" and pledged "aggressive steps to hold responsible those who stole this information". Republicans branded it terrorism.

Manning faces a court martial and up to 52 years in prison for his alleged role in copying the diplomatic cables, as well as the leak of military logs about incidents in Afghanistan and Iraq and a classified military video which showed a crew of an American Apache helicopter gunning down a group of men who they thought had a rocket launcher. They turned out to include Reuters staff with a TV camera.

He is said by friends to be on antidepressants and only a limited list of visitors are able to see him, yet one who saw him in recent weeks told the Guardian he was "doing surprisingly well, he is in high spirits".

In the new year he will face a pre-trial hearing, then, his lawyer expects, a public court martial in New York state in the spring.

So far he does not have enough money to pay for his defence, the costs of which have been estimated at $130,000 (£84,000).

A fundraising exercise set up in his name by the Courage to Resist Fund has raised $90,000 to date, from donations and selling "Free Bradley Manning" T-shirts and badges.

But who is Bradley Manning, and what motivated him?

Some insight into what drives him can be gleaned from the online chat he had from Iraq with a former hacker in which he talked about how he felt that no one had ever noticed him in life.

"[I'm] regularly ignored except when I had something essential then it was back to 'bring me coffee, then sweep the floor'," he told a fellow hacker who asked what he would do if his cover was blown during an online chat shortly after he is alleged to have sent the files to WikiLeaks. "[I] felt like I was an abused work horse."

Manning even added an "emoticon" of a crying face :'(.

"I've been so isolated so long," he went on, adding he was "self-medicating like crazy". "I just wanted to be nice, and live a normal life … but events kept forcing me to figure out ways to survive … smart enough to know whats going on, but helpless to do anything … no one took any notice of me."

But he was also apparently filled with hope for what the leaks might achieve, having been buoyed by the public reaction to the Apache video, which had already been released, and hoped that he could do something positive.

"God knows what happens now," he said, having sent the material to WikiLeaks. "Hopefully worldwide discussion, debates, and reforms. If not … than we're doomed as a species. I will officially give up on the society we have if nothing happens. The reaction to the video gave me immense hope … CNN's iReport was overwhelmed … Twitter exploded …"

It is unlikely he would be disappointed with the coverage of the cables, which continue to lead news bulletins around the world. His chances of observing their impact from a position of freedom were shattered when the hacker he was talking to in May this year, Adrian Lamo, reported him to the federal authorities.

"I'd be one paranoid boy in your shoes," Lamo told him ominously. Within 24 hours officers from the US Army Criminal Investigation Command arrested Manning and took him into custody in Kuwait.

Bradley Manning was born in Oklahoma to a Welsh mother, Susan, who had met Bradley's father, Brian, when he served at Cawdor Barracks, near Haverfordwest.

He has said he was "raised Catholic [but] never believed a word of it" and that in the army he wore customised dogtags that said "Humanist".

Manning moved back to Wales in 2001 aged 13 when his parents divorced and he sat his GCSEs at Tasker Milward school where people who knew him said he was a "hot-headed" computer nerd who was bullied.

"He was known for having a bit of an attitude," a schoolfriend told the Guardian. "Frankly I didn't like him very much."

His mother, Susan, lives in a modern terrace house in a cul-de-sac in Haverfordwest, which became the centre of an FBI investigation earlier this year.

Susan Manning's sister, Sharon Staples, has described how "these guys in dark suits" – whom she took to be FBI officers – questioned her sister, who has been in and out of hospital recently after a series of strokes.

After dropping out of school, Manning returned to America and joined the army. Based in upstate New York, he met Tyler Watkins, a musician who became his boyfriend and through whom he is thought to have come into contact with a thriving computer programming community based around MIT in Boston. They discovered a shared interest in the reforming potential of technology.

When he was posted to Iraq he found himself with "unprecedented access to classified networks 14 hours a day 7 days a week for 8+ months".

The scope of the intelligence he found was "so broad and yet so rich" it overwhelmed him.

During an exchange with Lamo, who was asking him about the scandals that might be found in the cables, he said: "I'm sorry, there's so many its impossible for any one human to read all quarter-million and not feel overwhelmed and possibly desensitized."

He was also outraged by some of the behaviour in the military and in the documents.

He hankered for transparency. "I want people to see the truth regardless of who they are because without information, you cannot make informed decisions as a public," he wrote to Lamo.

Manning explained he "developed a relationship" with Julian Assange, the founder of WikiLeaks, but found him elusive. "I don't know much more than what he tells me, which is very little," he said. "It took me four months to confirm that the person I was communicating [with] was in fact Assange."

Lamo asked how he would get in touch with Assange and Manning told him simply "he would come to you", although when pressed he said he used an encrypted online chat programme.

Manning returned to Boston on leave in January this year. The tech community he befriended there have since become subject to inquiries and surveillance by federal investigators amid suspicions they facilitated the leak, allegations they have all strongly denied.

Shortly after Manning returned to Iraq, he is alleged to have sent his first document to WikiLeaks in what was, in effect, a dummy run for the aim of getting encrypted data on to the publicly accessible internet.

It was a diplomatic cable relating to Iceland. Within weeks, he had downloaded all the other material and WikiLeaks was primed to make its name and so cast Manning into the fight of his life.