Lesotho’s prime minister, Thomas Thabane, who was expected to be charged on Friday in the killing of his estranged wife, failed to appear in court, the authorities said, following weeks of mounting pressure and his announcement that he would resign from the country’s top political office.

Mr. Thabane’s press secretary said on Friday that the prime minister felt ill on Thursday evening and had left for neighboring South Africa to receive an emergency medical checkup. The press secretary, Thabo Thakalekoala, said he expected the prime minister to return to Lesotho over the weekend, whenever doctors in Johannesburg released him.

“He is willing to appear before the court of a law and hear the charges against him,” Mr. Thakalekoala said, adding that the prime minister could appear in court early next week.

The killing has riveted the southern African kingdom for more than two years as accusations have swirled around Mr. Thabane, 80, and his new wife, Maesaiah, who had long competed for the title of Lesotho’s first lady and was herself charged in the killing this month.