Pakistan has summoned a senior Bangladeshi diplomat to protest the "unfortunate hanging" of the head of Bangladesh's largest Islamist party for his alleged role in genocide and war crimes during the independence war against Pakistan in 1971.

The Foreign Ministry on Thursday said the leader of the Jamaat-e-Islami party, Motiur Rahman Nizami, was convicted and sentenced based on a flawed judicial process. Nizami, 73, was executed Wednesday.

Thousands of supporters of Nizami in Pakistan organized a special memorial service for him on Wednesday.

Nizami is the fifth senior official from Bangladeshi opposition parties to be executed since 2013 for alleged war crimes during the 1971 conflict.