CAGLIARI, Italy (AP) — Cagliari has rehired Diego Lopez as coach, a day after firing Massimo Rastelli.

The Serie A club announced on Wednesday that Lopez had signed a contract until June 2019.

Lopez was in charge of Cagliari from 2013-2014, after previously working for the youth team and as an assistant coach.

He also made 342 appearances in 12 seasons as player for the Sardinian club.

Rastelli was fired two days after a 3-2 home loss to previously winless Genoa left Cagliari in 14th place with six points.

It was Cagliari's sixth loss in eight matches, its fourth straight defeat and third consecutive at home.

Rastelli had led the club to the Serie B title in 2016 and an 11th place finish in the top division last season.