MADRID, Jan 4 (Reuters) - Iberdrola's U.S. unit Avangrid has agreed to extend the deadline to close an $8 billion planned takeover of rival PNM Resources to April 20, 2023, after a New Mexico regulator blocked the deal last month, the Spanish company said on Tuesday in a filing to the local stock market regulator.

The deal could be extended three months further if both parties agree, Iberdrola said.

Avangrid and PNM Resources on Monday filed an appeal to the New Mexican Supreme Court against a December decision by the New Mexico's utility regulator NMRC to stop the takeover, Iberdrola said.

The regulator in New Mexico rejected Avangrid's proposed $8 billion acquisition of PNM Resources a month ago, saying the deal's risks outweighed its promised benefits to state ratepayers. (Reporting by Inti Landauro; editing by Jason Neely)