Pakistan on Wednesday executed five men who were convicted by military courts on charges of terrorism, an army spokesman said in a statement.

The five convicts were hanged at a jail in Kohat, said Major General Asif Ghafoor, director general of Inter-Services Public Relations, the military's media wing.

The ISPR statement added that the convicts had admitted to their offenses that involved attacks on army and other law enforcement personnel.

Military courts in Pakistan were established in wake of the Army Public School massacre through the controversial 21st Amendment. Over time, the courts penetrated their way into the criminal justice system of the country. They have ceased to function after the expiry of mandated period.

The ruling Pakistan Muslim League-Nawaz, which was all set to get legislation for granting extension to military courts, has to suffer a setback when PPP, the main opposition party in parliament, came up with certain proposals for the extension mechanism of these courts established under a sunset clause in early January 2015 for a period of two years.