CAIRO — Egypt’s first Islamist president-elect yesterday promised throngs of cheering supporters that he would push for the release of the blind sheik who masterminded the 1993 World Trade Center bombing and who is currently doing life in a US prison.

“I will do my best to free all detainees — including Dr. Omar Abdel-Rahman,” Mohamed Morsi reassured the thousands gathered to see him take a symbolic oath of office at Tahrir Square.

Morsi, 60, still faces a power struggle with high-ranking members of the military who survived the toppling of Hosni Mubarak in February after 30 years of iron-fisted control.

But as he spoke, he made sure to acknowledge the dozens of supporters who attended the rally holding posters bearing Abdel-Rahman’s picture.

Morsi vowed to seek the sheik’s release and repatriation to Egypt on humanitarian grounds.

And that, in particular, outraged Mayor Bloomberg.

“The conviction of Sheik Omar Abdel Rahman was a measure of justice against a man who tried to kill so many,” the mayor said. “New Yorkers would oppose any effort to undermine his serving his life sentence.”

For now, Morsi appears to have his hands full with Egypt’s ruling generals. Since his election, they have given themselves sweeping powers with the sole intent of undercutting his authority.