Lt Colonel Stuart Scheller, a former Marine battalion commander, who complained about the US withdrawal from Afghanistan in online videos, pleaded guilty on Thursday to charges including conduct unbecoming an officer.

The videos made him well-known in conservative political circles.

Scheller entered the plea to charges that also include failure to obey order or regulation during the court-martial at Camp Lejeune in North Carolina, his attorney Tim Parlatore was quoted as saying by the Associated Press.

A sentencing hearing followed the morning proceedings and adjourned late Thursday afternoon. It will resume Friday morning when a decision is expected.

Scheller told a judge he made his comments “because I thought it was in the best long-term interest of the Marine Corps,” The Daily News of Jacksonville reported.

Scheller said he went public instead of through “the proper channels” because, otherwise, his complaints would not have been heard by the commandant of the Marine Corps, the US secretary of defense, or the American public.

“At no time did I advocate for the violent overthrow of the government,” he said. “At no time did I ever say I was going to use violence.”

In a sign of support, two Republican members of Congress testified on his behalf — Representative Marjorie Taylor Greene by teleconference and Representative Louie Gohmert in person, The Daily News of Jacksonville reported.

Scheller had said in an August 26 video posted on Facebook that he was willing to risk his career to call out military leaders regarding the withdrawal from Afghanistan after 13 US troops were killed in Kabul.

“I am willing to throw it all away to say to my senior leaders: I demand accountability,” he said in the video while wearing a camouflage uniform.

Scheller continued to speak out and his videos attracted numerous views. He became the subject of a fundraising campaign and received the support of a nonprofit legal defense fund for former service members.

(With AP inputs)