BOSTON — Lying grievously wounded in a hospital bed, the surviving suspect in the Boston Marathon bombings admitted on Sunday to playing a role in the attacks, said law enforcement officials, and on Monday he was charged with using a weapon of mass destruction that resulted in three deaths and more than 170 injuries.

Uttering the word “no” once, but mostly nodding his responses, the suspect, Dzhokhar Tsarnaev, 19, was charged in a brief but dramatic bedside scene in the intensive care ward of Beth Israel Deaconess Medical Center, where he is recovering from multiple gunshot wounds sustained during his capture last week.

Mr. Tsarnaev made his admission on Sunday morning to specially trained F.B.I. agents who had been waiting outside his hospital room for him to regain consciousness. After he woke up, they questioned him, invoking what is known as the public safety exception to the Miranda Rule, a procedure authorized by a 1984 U.S. Supreme Court decision which in certain circumstances allows interrogation after an arrest without notifying a prisoner of the right to remain silent.

In the course of questioning him about whether he knew of any other active plots or threats to public safety, he admitted that he had been involved in laying the bombs that killed three people at the finish line of the Boston Marathon.