McGuinness resigned as deputy First Minister in January 2017 amid the Renewable Heat Incentive scandal, which involved a green energy scheme that Foster set up during her time as Minister for Enterprise and Investment. The scheme was set to cost the taxpayer £490 million and there were allegations of corruption surrounding it. McGuinness asked Foster to step aside as First Minister while her involvement in the scheme was investigated, but she refused to step aside or resign and said that the voices calling for her resignation were those of "misogynists and male chauvinists". Under the terms of the Northern Ireland power-sharing agreement known as the Good Friday Agreement, the First and deputy First Ministers are equal and, therefore, Foster could not remain in her post as First Minister, even in a caretaker capacity. McGuinness's resignation caused a 2017 snap assembly election to be held, in which the DUP lost 10 seats. In January 2020 she became First Minister of Northern Ireland again after the cabinet was reinstated.