MADRID—Standard & Poor's said Thursday it downgraded Spain's sovereign credit rating by two notches, citing "a challenging fiscal outlook" amid worries on the ability of the country's regions to curb spending.

The agency said its outlook is negative, reflecting risks to Spain's economic growth and budgetary performance.

The move is the latest...