Martial law is when a government must enact control over the citizens due to an event that is dangerous to other citizens or the government. There have been a few incidents where martial law has occurred in different countries. Most cases take place during a revolution to overthrow the government. Many protests will take place and these can turn violent. With the group of protesters growing bigger and bigger, the government must take action to stop them.
One of the more recent times was in Egypt in 2013. In late 2012, a new president was elected and the prime minister decided to include many new members in the cabinet with a few of them being Muslim. This upset the citizens who feared Muslim practices would occur so they protested.