If a senator dies, resigns, or is expelled, the Seventeenth Amendment allows state legislatures to empower the governor to appoint a replacement to complete the term or to hold office until a special election can take place. However, there are a few exceptions to this rule. Some states require a special election to fill a vacancy, while a few states require the governor to appoint a replacement of the same political party as the previous incumbent. The date when a senator appointed to fill a vacancy is succeeded by a senator elected to fill the remainder of the term depends on a number of factors. If a vacancy in the office of United States senator occurs more than one hundred fifty days before the next regular primary election date, the person who is appointed shall continue to serve until the vacancy is filled at the next general election. If a vacancy in the office of United States senator occurs one hundred fifty days or less before the next regular primary election date, the person who is appointed shall serve until the vacancy is filled at the second regular general election held after the vacancy occurs, and the person elected shall fill the remaining unexpired term.