Marriage in Islam has essential “pillars” and conditions; if they are fulfilled then it is a valid marriage. The “pillars” are the proposal and acceptance. The proposal is where the woman’s wali (guardian) says: I give So and so (or my daughter or my sister) to you in marriage. Acceptance is when the man says: I accept marriage to So and so.
The conditions of marriage include: Naming the bride and groom, their consent, the contract being done by the wali or his deputy, and the presence of two Muslim witnesses of good character, because the Prophet (peace and blessings of Allaah be upon him) said: “There is no marriage except with a wali (guardian).” Narrated by Abu Dawood (2085), al-Tirmidhi (1101), Ibn Majaah (1881), from the hadeeth of Abu Moosa al-Ash’ari; classed as saheeh by al-Albaani in Saheeh al-Tirmidhi.
It was also narrated by al-Bayhaqi from the hadeeth of ‘Imraan and ‘Aa’ishah (may Allaah be pleased with them) with the wording: “There is no marriage except with a wali and two witnesses of good character.” Classed as saheeh by al-Albaani in Saheeh al-Jaami’ no. 7557.
Some scholars are of the view that if the marriage is announced, then there is no need for two witnesses to the marriage contract.
With regard to civil marriage that is done in a court that implements man-made laws, if what is meant is documenting the marriage and recording it, then this is something that is required, so as to protect people’s rights and prevent tampering with marriage. But if the conditions of marriage are not met or it involves anything that is contrary to sharee’ah with regard to divorce and so on, then it is not permissible to do it, unless documentation of the marriage cannot be done otherwise, or if the person has no choice but to do it. In that case he can do the correct marriage contract according to sharee’ah in an Islamic centre, then do the civil marriage in the court, but he should resolve to refer to sharee’ah law in the event of any dispute, and to disavow himself of the false rituals that accompany the marriage contract in some countries. The Muslims who live in western countries should strive to have their marriages recorded officially in Islamic centres, with no need to go to the civil marriage office.
And Allaah knows best.