Details remained sketchy but the interior ministry said in a statement that bombs were planted under a seat near a cafe just outside the al-Hussein Hotel.
The Egyptian Middle East news agency, quoting witnesses, earlier reported that explosive devices were thrown from the roof of a nearby hotel.
Blood stains could be seen in the front courtyard of the mosque, next to the famed bazaar.
Police later detonated a second device without causing any injuries.
Riot police cordoned off the area and sniffer dogs could be seen as the mosque was evacuated.
"I was praying and there was a big boom and people started panicking and rushing out of the mosque, then police came and sealed the main door, evacuating us out of the back," said Mohammed Abdel Azim, who was inside the mosque at the time.
Amr el-Kahky, Al Jazeera's correspondent in Cairo, said no one had claimed responsibility for the attacks but police had detained three suspects for questioning.
|Police have detained at least three suspects for questioning [AFP]
He said some analysts had suggested a link to Israel's offensive against Gaza last month, in which Egypt was criticised in the Arab world for not opening its Rafah border crossing with Gaza and not doing enough to help the Palestinians.
Speaking to Al Jazeera, Samer Shehata, an expert in Arab politics from Georgetown University in the US, said it was unlikely that the attacks were carried out by a purely Egyptian group.
"It could have been Egyptians or a group that is affiliated to al-Qaeda or sympathetic to the international terror network," he said, adding that the Egyptian government had taken a very unpopular position during the Gaza war.
Shehata pointed out that attacks in the past had targeted Egyptian tourism because it was one of the country's leading sources of revenue and employment.
"Hitting the tourism sector is a direct blow to the state. The fact is previous attacks have also occurred in this sector, as opposed to targeting government officials or buildings."
The historic district was the scene of a previous bomb attack in 2005 in which two tourists were killed and 18 wounded.