Between 3 January 2012 and 25 March 2017, he had served as Minister of Justice and Liberties in Abdelilah Benkirane's government.
[1][2] Having served as the defense lawyer for Islamist Hassan al-Kattani, Ramid played an important role in achieving the pardon of Kattani and other Islamists along with promises for the renunciation of violence and extremism.
[3][4] On July 7, 2015, during an interview on Chada FM radio, he advised homosexuals to change their sex to avoid problems.
[5] In September 2017, when questioned by a journalist on the rejection of the UN recommendations relating to the decriminalization of homosexuality by Morocco, he replied: "Enough is enough.
He persisted a few days later, qualifying homosexuality as "sexual deviance" and affirming that it "remains a crime punished by Moroccan law and is moreover not acceptable by our society".