Al Jazeera's journalist Ahmed Mansour
Al Jazeera's journalist Ahmed Mansour (C) reacts after being released in Berlin, GermanyReuters

Prominent Al Jazeera journalist walked free from a Berlin prison on Monday, drawing a line under an awkward diplomatic incident for Germany two days after he was detained at Egypt's request.

Ahmed Mansour, one of Jazeera's best-known journalists, was released after Egypt was unable to dispel concerns about the extradition process, the Berlin public prosecutor's office said in a statement.

Earlier, a foreign ministry spokesman told a news conference that Germany would not extradite anyone to any country where he or she might be sentenced to death.

A Cairo court sentenced Mansour - a joint British-Egyptian national - to 15 years in prison in absentia last year on a charge of torturing a lawyer in 2011 in Tahrir Square, the focus of the uprising that toppled Hosni Mubarak. Mansour and Al Jazeera deny the charge.

"I thank the defence team. I thank the free press. I thank all of you," Mansour, dressed smartly in black, shouted to a crowd of his supporters outside central Berlin's Moabit prison.

The crowd chanted "Allah Akbar" (God is greatest) and "Down, down with military rule" – a slogan that is chanted in pro-Muslim Brotherhood demonstrations – in reference to the military rule that followed the ouster of former Egyptian President Mohamed Mursi of the Brotherhood.

Egypt accuses Al Jazeera of being a mouthpiece of the Muslim Brotherhood, the Qatar-backed Islamist movement that President Abdel Fattah al-Sisi removed from power in 2013 when he was army chief and denounces as a terrorist group.

Mansour's case has put Germany in an awkward position as it tries to balance business interests and human rights.

Chancellor Angela Merkel was criticised by opposition parties and rights groups for hosting Sisi this month. During that visit, German industrial group Siemens signed an 8-billion-euro ($9-billion) gas and wind-power deal with Egypt.

Last year, an Egyptian court jailed three Al Jazeera journalists on charges that included aiding a terrorist group. One of them, Australian Peter Greste, was released in February after 400 days in prison.

Mohamed Fahmy, a naturalised Canadian who has given up his Egyptian citizenship, and Egyptian Baher Mohamed were released on bail in February after spending more than a year in custody and are being retried.

Since Sisi took power in 2013 and won a presidential election the following year, courts in Egypt have issued scores of death sentences against Muslim Brotherhood members, including the group's leadership.