FORT MEADE, Md. — Pfc. Bradley Manning on Thursday confessed in open court to providing vast archives of military and diplomatic files to the antisecrecy group WikiLeaks, saying that he released the information to help enlighten the public about “what happens and why it happens” and to “spark a debate about foreign policy.”

Appearing before a military judge for more than an hour, Private Manning read a statement recounting how he joined the military, became an intelligence analyst in Iraq, decided that certain files should become known to the American public to prompt a wider debate about foreign policy, downloaded them from a secure computer network and then ultimately uploaded them to WikiLeaks.

“No one associated with WLO” — an abbreviation he used to refer to the WikiLeaks organization — “pressured me into sending any more information,” Private Manning said. “I take full responsibility.”

Before reading the statement, Private Manning pleaded guilty to 10 criminal counts in connection with the huge amount of material he leaked, which included videos of airstrikes in Iraq and Afghanistan in which civilians were killed, logs of military incident reports, assessment files of detainees held at Guantánamo Bay, Cuba, and a quarter-million cables from American diplomats stationed around the world.