I will refer to Quran for explaining how Faraon treated their oppositions more than 4000 years ago.
- Sureh 26 (Al-Shoara), Verse 49: Faraon threaten his opposition of cutting their leg and hand in opposit direction and execution
- Sureh 20 (Taha), Verse 71: Faraon talk to his opposition: I will cut your hand and leg in opposite direction, hung you from the trees or kill you.
- Sureh 7 (Al-Aaraf), Verse 124: Faraon: I will cut your hand and leg in opposite direction or execute you.
- Sureh 5 (Al-Maedeh), Verse 33: People who fight against Allah (opposition) and his messenger (Mohammad) in short unbelievers has to be either execution, killed or cut their hand and leg in opposite (e.g. right hand and left leg or left hand and right leg) or they have to exiled from their home town. This is the punishment for in this life and their punishment is even more in the life after the death.
If we carefully read Quran in more than 90% talks about preventing opposition to talk, think or criticize Allah, Mohammad and his followers. If anybody does he/she will consider (Mohareb) which means fight against Allah. Therefore above punishment will be performed which is happening in countries like Iran. Any opposition is considered "Mohareb" and being executed, tortured, raped,... just because they have a different view in any form (political, civil rights, economical,...).