After a highly publicized trial in an emergency state security court, 23 of the men were convicted and sentenced to prison terms of one to five years for immoral behavior and contempt of religion. Egypt's crackdown on gays and atheists is taking place as the country of nearly 90 million people appears to be steadily moving to the right, with jingoism and xenophobia dominating the media as the army and security forces battle Islamic militants waging a campaign of violence against them in the Sinai Peninsula. Authorities say the nation's national interests must take precedence over everything else so Egypt can be spared the fate of countries like Syria, ravaged by a three-year-old civil war, or neighboring Libya, where radical Islamic militias control large swathes of the vast oil-rich nation.