A court-martial is a judicial court specifically designed to handle criminal allegations made against military members. Courts-martial are criminal trials for members of the armed services who are accused of offenses under military law. Unlike civilian courts, courts-martial operate under the Uniform Code of Military Justice (UCMJ), which sets out the laws that govern military personnel. The primary purpose of a court-martial is to maintain discipline and order within the military by ensuring that service members adhere to the strict codes of conduct required for military effectiveness.