As Pakistan prepares for general elections scheduled for Feb. 8, the social and political environment in the country is in disarray, to say the least.

There are reports of ongoing arrests and a widespread government crackdown targeting politicians, activists and groups challenging the establishment dominated by the Punjabis, the country’s largest ethnic group, who are also in charge of the army — which in turn controls the state machinery.

This machinery is now in motion to “engineer” the upcoming election, in the words of a political analyst cited by Al Jazeera, in favor of the establishment and its preferred candidate, Nawaz Sharif. Sharif — who recently returned to Pakistan after a self-imposed four-year exile — has served several terms as premier, the first in the early 1990s and the latest from 2013 to 2017, and is the brother of former Prime Minister Shehbaz Sharif, who resigned from office in August.

On the backdrop of historic grievances, the election will have a far-reaching impact on ethnic fault lines, to the point that these could threaten Pakistan’s stability at its core.

The army has traditionally controlled the political and economic life of the country since its inception in 1947, yet has long struggled to address communal tensions. The Pashtuns, Pakistan’s second-largest ethnic group, have been consistently marginalized, leading to levels of resentment and anger that — compounded with the military’s shortsighted policies in Afghanistan — have fueled the rise of the Pakistani Taliban.

Together with Pakistan's Inter-Services Intelligence (ISI), the army actively supported the rise of the Taliban in Afghanistan in the mid-1990s. With this agenda in mind, it mobilized and radicalized Pashtuns in Pakistan. This Pashtun-led, pro-Taliban strategy has since backfired tremendously, with Tehreek-e-Taliban Pakistan (TTP) — the Pakistani Taliban — now aiming for a victory similar to that of its Afghan brethren at home.

Currently, on one side of the political crisis in Pakistan are the Punjabis led by the Sharif brothers, and backed by several Islamist parties, together with army chief General Asim Munir. On the other side are former Prime Minister Imran Khan, a Pashtun — who on Tuesday was sentenced to 10 years in prison for leaking state secrets and, the following day, to another 14 years for selling state gifts — his Pakistan Tehreek Insaf (PTI) party, the Pashtun Tahafuz Movement (PTM) and the Baloch ethnic group.

In this scenario, the TTP is benefiting from the political crisis as much as it is from the sanctuary granted it across the Durand Line, the de facto border between Afghanistan and Pakistan, since the Afghan Taliban took back power in August 2021 — an arrangement that, in all probability, will allow it to survive in the long haul.

Inspired by the Taliban's resurgence in Afghanistan, the TTP has intensified its attacks against the Pakistani army, joined by separatist Balochs fighting their own struggle for self-determination.

The latest chapter in the conflict came after the army moved against the PTI. As prime minister, Khan had supported a policy of reconciliation and resettlement for the TTP, but this was abandoned after his ouster in April 2022. The military — sleepwalking in its support for the Afghan Taliban over the last two decades — was alarmed by the growing strength of Pashtuns in Pakistan. It was equally unhappy with Khan for trying to promote Punjabi general Faiz Hameed, director general of ISI, to the position of army chief.

In response, the military establishment swiftly removed Hameed as head of ISI and assigned him to a marginal role as corps commander, before forcing his early retirement. Instead, staunch anti-Pashtun general Munir was promoted to the top job.

The army also removed Khan as prime minister by pushing through a parliamentary vote, began a widespread crackdown against the PTI and took unilateral action to assassinate Taliban inside Afghanistan — especially those from the TTP delegation sent to negotiate with the Pakistani military in Kabul. These killings infuriated the Taliban on both sides of the border, leading them to declare an all-out war with Islamabad’s army.

The TTP's recent attacks in Pakistan should be viewed through this lens. Attempts at containing and marginalizing Pashtuns in Pakistan have always fueled its terror campaigns by facilitating the recruitment of fighters and mobilization of resources.

And though there is no active coordination between the PTI, PTM and Baloch groups in the political sphere, their actions appear to be concerted as they collectively challenge the military’s electoral engineering.

In this context, a result in favor of Nawaz Sharif could trigger a chain of political and security-related reactions that would be difficult for the army to control. It is already struggling to prevent young Baloch protesters from marching on the streets of Islamabad, has abducted Manzoor Pashteen, the charismatic young leader of the PTM, and even resorted to internet blackouts to prevent discussions on X (formerly Twitter) organized by the PTI.

Such desperate and ill-conceived actions have the potential to escalate tensions to the point of chaos — which could further destabilize Pakistan and, even, undermine its very existence as a state.

In this context, foreign players need to acknowledge the Pashtun and Baloch struggles against over seven decades of dominance and control by Punjabi army officers. These minority groups have consistently been treated as second-class citizens, denied equal opportunities and discriminated against at every turn. But they are resisting, demanding equal rights and an equitable share of power, and — more importantly — a free and transparent electoral system.

While it will be difficult for the army establishment to untangle itself from this quagmire, the United States and its allies need to do everything they can to smooth tensions. This includes encouraging the military leaders to engage in a genuine reconciliation effort with the Pashtuns, Balochs and other ethnic groups, and be open to eventually sharing power with them. All with the goal of ending the violence and instability that are brewing across Pakistan.

The situation is complex and there is no easy solution. However, foreign powers can play a role in preventing an all-out ethnic conflict by taking the necessary steps to engage all stakeholders.

The army and political elite in Pakistan need to understand that this is a moment for peace, equality and true democracy. They also need to stop using violence as well as the government, judiciary and parliament to suppress opponents in view of the upcoming elections, and beyond.

Sadiq Amini is a program manager at Observer Research Foundation America (ORF America), overseeing external relations and outreach. Previously, he was a political assistant at the United States Embassy in Kabul and worked at Afghanistan’s permanent mission to the United Nations. The views expressed here do not necessarily reflect the positions of ORF America.