Pakistan's Supreme Court has disqualified a lawmaker from the ruling party for five years after finding him guilty of threatening judges in a speech last year.

In Thursday's decision, the court also sentenced Nehal Hashmi, of the Pakistan Muslim League, to one month in prison.

The decision came a day after Hashmi apologized over his May 2017 speech, in which he threatened judges for ordering a corruption probe against former Prime Minister Nawaz Sharif. In the speech, he said once the judges retire, "we will make your life and (the lives of) your family members miserable."

In July 2017, the Supreme Court disqualified Sharif from office for concealing assets.

Since then, Sharif himself has castigated judges for ousting him from power, but has faced no legal action over his speeches.