US president Barack Obama may have prejudiced the trial of US army private Bradley Manning who is charged with leaking classified US documents to WikiLeaks, by saying at a fundraiser that Manning "broke the law", a leading British MP has warned.

Ann Clwyd, chairwoman of the all party parliamentary group on human rights chaired a meeting on Tuesday about the plight of the alleged WikiLeaks source to coincide with Obama's state visit to Britain. She said she found the presidents remarks at a fundraising event in San Francisco last month "an amazing thing for the president of the United States to comment on when the man hasn't stood trial yet".

The fundraising where Obama was challenged about the US government's treatment of Manning was recorded on video. "I can't conduct diplomacy on an open source," Obama told an unidentified questioner. "That's not how … the world works. If I was to release stuff, information that I'm not authorized to release, I'm breaking the law … We're a nation of laws. We don't individually make our own decisions about how the laws operate … He broke the law."

Manning, 23, is facing a long prison sentence after being charged with leaking highly embarrassing secret government documents about the conduct of the wars in Iraq and Afghanistan, Guantanamo Bay and diplomatic cables from every US embassy in the world. He is accused under military law of obtaining the documents while at forward operating base Hammer in Iraq and passing them to Wikileaks for publication.

Manning was charged under the Uniform Code of Military Justice with "transferring classified data onto his personal computer and adding unauthorized software to a classified computer system in connection with the leaking of a video of a helicopter attack in Iraq in 2007," and "communicating, transmitting and delivering national defense information to an unauthorized source and disclosing classified information concerning the national defense with reason to believe that the information could cause injury to the United States."

Charges include wrongfully obtaining classified material for the purpose of posting it on the internet, knowing that the information would be accessed by the enemy; the illegal transmission of defence information; fraud; and aiding the enemy. The charges relate, among other things, to the alleged theft of more than 380,000 records from the US government's Combined Information Data Network Exchange database for Iraq, over 90,000 records from the same system for Afghanistan, more than 700 records from its Southern Command database about Guantanamo Bay and more than 250,000 records from the State Department's Net-Centric Diplomacy database, commonly known as the US Embassy cables.

Emily Butselaar, an editor at Index on Censorship, the free speech pressure group, said her organisation is also concerned that Obama may have prejudiced Manning's right to a fair trial by declaring he has broken the law.

"Despite making freedom of information and transparency key commitments of his presidential campaign, Obama's administration is cracking down on whistleblowers," she said.

"If there has to be a trial, it should be in public and not a closed military trial," Clwyd said.

A White House spokesman declined to comment citing the legal process that is underway.

Manning's detention for 23 hours a day in a tiny unfurnished cell at Marine Corps Base Quantico in Virginia, caused a storm of protest. He was held in a space measuring 6ft by 12ft with no window, furnished with a bed, toilet and sink. He was fed antidepressant pills, forbidden to exercise in his cell, and forcibly woken if he attempted to sleep in the daytime. A so-called "prevention of injury" order deprived him of his clothes at night and also of normal sheets and bedding.

Juan E Mendez, a UN special rapporteur on torture, investigated his case and accused the US government of prevarication in response to his request for an unmonitored meeting with Manning, saying he was deeply disappointed and frustrated. State Department spokesman PJ Crowley called Manning's treatment "ridiculous and counterproductive and stupid" and resigned two days later.

Last month, the Pentagon transferred Manning to a medium-security facility in Fort Leavenworth, Kansas, where he has more freedom of movement.

• This article was amended on 30 June 2011. The original misspelt Ann Clwyd as Ann Clywd. This has been corrected.