illegal has definitions from the field of law
1
[ adjective ] (law) prohibited by law or by official or accepted rules

Examples

"an illegal chess move"

Used in print

(Ann Hebson, The Lattimer Legend....)

The peddler came bawling his wares and told them of the convention in Wheeling , Which had formed a new state_government by declaring the government at Richmond in the east illegal because they were traitors .

*