Chelsea Manning, the former Army intelligence analyst who provided secret military and diplomatic documents to WikiLeaks in 2010, was sent to jail again on Thursday after refusing to testify before a grand jury investigating the organization, which publishes leaks online.

Ms. Manning was jailed for similar reasons in March, but was released last week when the term of the grand jury that had served her with a subpoena in January expired.

This month she was served with another subpoena to appear before a new grand jury. At a closed hearing on Thursday, she told a federal judge that she would not answer questions, and he ordered her to be sent back to Alexandria Detention Center in Virginia, either until she agrees to testify or until the grand jury’s term expires in 18 months.

The judge, Anthony J. Trenga of United States District Court for the Eastern District of Virginia, also ordered Ms. Manning to be fined $500 for every day she remains in custody after 30 days, and $1,000 for every day she remains in custody after 60 days.