BOSTON — Gov. Deval Patrick on Monday signed into law new limits on alimony in Massachusetts, sharply curbing lifetime alimony payments in divorce cases and making a series of other changes to a system that critics considered outdated.

The previous system allowed judges to award lifelong alimony after both short and long marriages, in contrast to the practices of most states. It often required payments to continue even after the spouse paying the alimony retired or the spouse receiving it moved in with a new partner.

The new law, which had widespread support in the legislature, allows most of those paying alimony to stop once they retire. It also sets limits, based on the length of a marriage, on the number of years former spouses can receive payments.

A marriage of five years or less that ends in divorce, for example, could require alimony payments for up to half of the length of the marriage. Those lasting between 15 and 20 years could require payments for up to 80 percent of the marriage.