Pakistan’s opposition announced Friday it will boycott a special session of the National Assembly this weekend called by the prime minister after a politically embarrassing defeat of Imran Khan’s key candidate in elections for the Senate.

Khan, who enjoys the backing of majority lawmakers in the lower house of parliament, convened the session for Saturday after his candidate lost the race for a seat in the 100-member upper chamber earlier this week.

The Senate elections on Wednesday saw the ruling Tehreek-e-Insaf party’s candidate, Finance Minister Hafeez Sheikh, lose against Yusuf Raza Gilani, a former prime minister and senior opposition leader.

FILE - In this March 16, 2020 file photo, Prime Minister Imran Khan speaks during an interview in Islamabad, Pakistan. Khan will seek a vote of confidence from the National Assembly later this week to prove he enjoys the support of majority in lower house of the parliament despite the defeat of his ruling party's key candidate in the Senate's elections a day before, a Cabinet minister said, Thursday, March 4, 2021. (AP PhotoB.K. Bangash)

FILE - In this March 16, 2020 file photo, Prime Minister Imran Khan speaks during an interview in Islamabad, Pakistan. Khan will seek a vote of confidence from the National Assembly later this week to prove he enjoys the support of majority in lower house of the parliament despite the defeat of his ruling party's key candidate in the Senate's elections a day before, a Cabinet minister said, Thursday, March 4, 2021. (AP PhotoB.K. Bangash)

Despite Sheik's loss, Khan's party emerged as the largest single party in the Senate but even with its allies from other parties, the opposition still has a slight, 53-47 majority over Khan in the upper chamber.

Following the balloting, the opposition demanded Khan step down but the ruling party rejected the demand and the prime minister called for the confidence vote.

Khan needs 172 votes in the 342-seat National Assembly to retain the confidence of the house on Saturday. If none of his supporters turn against him, he is expected to win as many as 180 votes in his favor, with help from allies from other parties. His own party has 157 lawmakers in the lower chamber.

People watch a live address to the nation by Pakistan's Prime Minister Imran Khan, at a shop in Karachi, Pakistan, Thursday, March 4, 2021. Khan on Thursday announced he would seek a vote of confidence from the National Assembly this weekend to prove he still has the support of majority lawmakers in the house, despite the surprising and embarrassing defeat of his ruling party's key candidate in Senate's elections. (AP PhotoFareed Khan)

People watch a live address to the nation by Pakistan's Prime Minister Imran Khan, at a shop in Karachi, Pakistan, Thursday, March 4, 2021. Khan on Thursday announced he would seek a vote of confidence from the National Assembly this weekend to prove he still has the support of majority lawmakers in the house, despite the surprising and embarrassing defeat of his ruling party's key candidate in Senate's elections. (AP PhotoFareed Khan)

On Friday, senior politician Fazlur Rehman, who heads the coalition of opposition parties called Pakistan Democratic Movement, announced that the opposition would boycott the session.

Sheikh’s defeat was a setback for Khan who even criticized the country's Election Commission, claiming it had failed to ensure a free and fair vote for the Senate and saying that some 15 or 16 lawmakers from his party allegedly “sold” their vote to the opposition candidate.

Angered over Khan's criticism, the commission on Friday fired back, saying every political party and politician needs to “have the spirit to accept defeat” when it comes and not resort to mudslinging over election losses.