A Montana police officer who wrote on his Facebook page that there should be a law allowing police to take people to jail for being “stupid” has resigned.

Bozeman City Manager Chris Kukulski says Cody Anderson submitted his resignation Wednesday.