The president of Pakistan, in keeping with the constitutional provision that the state religion is Islam, must be a Muslim. Elected for a five-year term by an Electoral College consisting of members of the Senate and National Assembly and members of the provincial assemblies, the president is eligible for re-election. But no individual may hold the office for more than two consecutive terms. The president may resign or be impeached and may be removed from office due to incapacity or gross misconduct by a two-thirds vote of the members of the parliament. The president generally acts on the advice of the prime minister but has important residual powers.