Egypt is one of the United States ' closest allies in the Middle East , receiving about $ 2 billion a year in financial and military aid , and the White House had hoped that it would serve as a showcase for promoting democracy as a means to halt the spread of extremism .