A Marine officer who publicly criticized the Biden administration’s chaotic evacuation of American and allied troops and civilians from Afghanistan has been released from a military brig a little over a week after he was incarcerated.

“Lt. Col. Stuart Scheller Jr. is being released from confinement today, Oct. 5, 2021, as a result of a mutual agreement between Lt. Col. Scheller, his Defense counsel, and the Commanding General, Training Command,” Marine Corps spokesman Capt. Sam Stephenson said in a statement. “No additional details regarding the agreement may be released at this time.”

Scheller was put in pretrial confinement at Camp Lejeune, N.C., on Sept. 27 after ignoring orders to refrain from posting on social media. He was previously relieved of his command after his initial criticism of the evacuations.

In a statement last week, Stephenson said Scheller stands accused of showing contempt toward officials, willfully disobeying a superior officer, failing to obey lawful orders and committing conduct unbecoming of an officer. He has not yet been charged.

Scheller was relieved of command shortly after posting a video on Facebook that demanded senior officials be held accountable for the Taliban’s sudden takeover of Afghanistan and the deaths of 13 American service members killed in a Kabul attack in August. He has said he plans to resign his commission.

The video, which Scheller shared hours after the Kabul attack, has been viewed 1 million times and shared 66,000 times on Facebook.

“I want to say this very strongly,” he said in the video. “I have been fighting for 17 years. I am willing to throw it all away to say to my senior leaders: I demand accountability.”

Scheller has been critical of both Democrats and Republicans in subsequent social media statements. But he has appeared to attract more support from the political right for criticizing the Afghanistan withdrawal, including from Rep. Dan Crenshaw (R-Tex.) and former president Donald Trump, who shared a story about Scheller on his website.

Dan Lamothe contributed to this report.