It's not like it hasn't happened before, twice at least, in the brief history of Pakistan, which is only about 60 years old.
Martial law was declared in 1969 and held through 1971. Earlier Martial law had been declared and the Constitution set aside from '58 to '62.