For example

As he was serving in the armed forces, he was remanded for trial at a court martial.