The US treatment of the man accused of leaking secret cables to Wikileaks, is "ridiculous and counterproductive and stupid", US State Department spokesman PJ Crowley has said.
Mr Crowley made the remarks about Bradley Manning to an audience at the Massachusetts Institute of Technology.
"Nonetheless Bradley Manning is in the right place," Mr Crowley said.
Private Manning is being held in solitary confinement at a maximum security US military jail.
He is shackled at all times and has been on suicide watch at the Quantico marine base in Virginia.
Mr Crowley was asked whether his comments were on the record and replied, "sure".
He could not immediately be reached on Friday to clarify whether he was speaking in a purely personal capacity at MIT or representing the view of the US State Department.
'Elephant in room'
Philippa Thomas, a BBC journalist on a student fellowship in Boston, was among about two dozen people gathered to hear Mr Crowley talk about "the benefits of new media as it relates to foreign policy", at an event organised by the Center for Future Civic Media.
After a wide ranging discussion, one young man said he wanted to address "the elephant in the room" and asked Mr Crowley what he thought about Wikileaks and in his words "torturing a prisoner in a military brig"?
Mr Crowley did not address the issue of torture, but replied that what was being done to Pte Manning by colleagues at the Department of Defence was "ridiculous and counterproductive and stupid".
"None the less Bradley Manning is in the right place," he added, going on to say that in Washington's view "there is sometimes a need for secrets… for diplomatic progress to be made".
Amnesty International has described the treatment of Pte Manning, whose mother is Welsh, as "harsh and putative" and has called on the British government to intervene.
In a letter released by his lawyers, Pte Manning claims he is routinely stripped to his underwear each night and his prescription glasses are confiscated, leaving him with limited vision.
Military officials have said this is standard procedure for people deemed a suicide risk.
Pte Manning has been charged on 34 counts, including illegally obtaining 250,000 secret US government cables and 380,000 records related to the Iraq war from a military database.
He has also been charged with aiding the enemy, a capital offence, but prosecutors have said they will not seek the death penalty.