London (CNN) A British man has been indicted on terror charges for fighting against ISIS in Syria and Iraq.

It is the first time someone who fought against the jihadist group has been charged under UK terror legislation, according to Britain's Crown Prosecution Service.

James Matthews, a former British soldier according to the UK Press Association, appeared at Westminster Magistrates Court in central London on Wednesday.

The 43-year-old is charged with having attended a place or places in Iraq and Syria where training was provided "for purposes connected with the commission or preparation of acts of terrorism."

Matthews pleaded not guilty and spoke only to confirm his identity, according to the Press Association.

Read More