ISLAMABAD — The U.S. Embassy in Pakistan on Wednesday apologized for retweeting an anti-government statement from an opposition leader who suggested Prime Minister Imran Khan would fall from power in the wake of President Donald Trump's election defeat.

"We have one in Pakistan too. He will be shown the way out soon," the Tuesday tweet by opposition lawmaker Ahsan Iqbal said, without naming Khan directly. The comment was retweeted Tuesday on the U.S. Embassy in Islamabad's account.

In its tweet on Wednesday, the embassy said its Twitter account had been accessed without authorization.

"The U.S. Embassy does not endorse the posting or retweeting of political messages. We apologize for any confusion that may have resulted from the unauthorized post," it said. It provided no additional details.

The controversy started Tuesday when Iqbal shared a screenshot on the social networking site of an article by The Washington Post with the headline "Trump's defeat is a blow for the world's demagogues and dictators."

Iqbal wrote: "We have one in Pakistan too. He will be shown the way out soon. Insha Allah" (God willing).

Iqbal has taunted Khan, saying he resembles Trump because of his arrogance.

Iqbal is a senior leader in the party of exiled former prime minister Nawaz Sharif, who has been living in London since last November when he left the country for medical treatment. Sharif's opposition Pakistan Muslim party has been holding large anti-government rallies to pressure Khan to resign.

In response to the U.S. Embassy retweet, Pakistan's minister for human rights, Shireen Mazari, took to Twitter, saying: "US Embassy still working in Trumpian mode in support of convicted absconder & intervening brazenly in our internal politics." In another tweet, she said the "US Embassy must observe norms of diplomacy."

The latest development came after many Pakistanis welcomed President-elect Joe Biden's victory over Trump, who had friendly relations with Khan and had publicly praised him for his help in paving the way for the U.S.-Taliban peace deal.

Also on Wednesday, Iranian Foreign Minister Javed Zarif met with Khan in Islamabad. According to a government statement, Khan told Zarif there was no military solution to the Afghan conflict.

Khan reaffirmed Pakistan's support for an Afghan-led and Afghan-owned peace process, saying he hoped "this historic opportunity would be seized by all Afghan parties to secure a political settlement," the statement said.

Violence has soared in Afghanistan in recent months, even as the Taliban and government negotiators hold peace talks in Qatar. The two sides have made little progress and attacks continue despite warnings from the U.S. that continued violence could derail the talks.