A federal judge is ordering that a North Carolina man get psychiatric treatment so that he might be able to stand trial on a charge that he sought to join an al-Qaida-linked militant group in Syria.

U.S. District Judge Terrence Boyle ordered Basit Sheikh of Cary hospitalized Wednesday for up to four months.

Sheikh argued in a stream-of-consciousness lecture during the 15-minute court hearing that he was mentally sound and that the U.S. should pay reparations for war deaths in Afghanistan, Pakistan and the Middle East.

The Pakistan-born Sheikh is charged with providing material support to a terrorist group. He was arrested in late 2013, an early target in an FBI effort to arrest Americans expressing interest before they could join terrorist groups fighting in the Syrian conflict.