A man walks past an image of cricket star-turned-politician Imran Khan, chairman of Pakistan Tehreek-e-Insaf (PTI) at a market in Islamabad, Pakistan, July 27, 2018. REUTERS/Athit Perawongmetha

ISLAMABAD (Reuters) - Pakistan’s two former dominant political parties said on Thursday they would join forces to field their own candidate for prime minister in parliament, challenging former cricket star Imran Khan, whose party won last week’s general election.

The alliance with several other smaller parties appeared unlikely to derail Khan’s election as prime minister, but it could leave him with a thin majority that could make enacting his agenda difficult.

Khan’s party, which won 116 of the 272 elected seats in the National Assembly, is believed to have enough would-be coalition partners among smaller parties and independents to win a majority vote to form a government.

But the main rival parties, which on Thursday repeated accusations that the July 25 vote was rigged by the powerful military, vowed to vote together with several smaller parties against Khan’s election as prime minister in parliament.

“It is an alliance which is against the rigged elections, and where all the political parties were not provided a free and fair, level playing field,” said Maryam Aurangzeb, speaking for the Pakistan Muslim League-Nawaz (PML-N) of jailed ex-prime minister Nawaz Sharif.

The opposition alliance was not believed to have the numbers to block Khan’s election.

A European Union election monitoring team in its initial assessment described the election campaign as an unequal playing field but said it was up to the people of Pakistan to decide on the vote’s legitimacy.

The PML-N joined with the Pakistan People’s Party (PPP), led by the son of assassinated former premier Benazir Bhutto, and several smaller nationalist and religious parties in forming the opposition alliance, known as the All Parties Conference.

The PMN-L and PPP have traded power in Pakistan for most of its history in between periods of military rule after the army seized power, which itself accounts for nearly half of the 71 years since independence from Britain.