ISLAMABAD, Pakistan — A court in Islamabad on Monday sentenced the former Pakistani prime minister Nawaz Sharif to seven years in prison on corruption-related charges, just months after he was released on bail in another graft case and a year after he was ousted from power.

Mr. Sharif, a once towering figure in Pakistan’s politics who served as prime minister three times, was led out of the courtroom, once again a prisoner.

He has been accused of money laundering, tax evasion and receiving kickbacks, but his latest trial centered on allegations that he possessed foreign assets greater than his known source of income — a government salary.

Mr. Sharif was out of prison on bail to stand trial in two cases. He was acquitted in the second case by the same court.