Pakistan faced numerous challenges after gaining independence in 1947, including:
1) Determining whether it would be a secular state or an Islamic state governed by sharia law.
2) Distributing power between the central and provincial governments, which eventually led to East Pakistan seceding to become Bangladesh.
3) Managing the violence and massive refugee crisis that accompanied the partition, with up to 24 million people displaced and hundreds of thousands dead.
4) Establishing political and economic stability despite the division of the new country into two wings over 1,600 km apart, lack of infrastructure and personnel for government, and loss of major economic partners and trade routes.