Mixed UK/Moroccan marriage - recognised in the UK?

Hi everyone I was wondering if anyone can help me? Im an english lady and I married the love of my life, a moroccan man in Morocco a few ago. We have been living in morocco and would like to try and apply for the UK spouse visa, we are aware on the success rate of this and how hard they are to attain now but we still want to give it a go.

Could anyone please tell me if our marriage is recognised under UK law if we were married in morocco? Also if its not recognised and we need to get it apostle stamped, how long we have to do this? we have been married a few months and it was such hard process so we are hoping there is no time frame to get the marriage certificate legalised :/

Thankyou Effie and Amine x

Assuming you had a certificate of no impediment issued at your local registry office before the wedding, and the marriage was conducted under local law with the correct certification issued, you should be able to register the marriage with the nearest British embassy.
However, some might say British embassies are rubbish, slow, obstructive, and expensive, but I won't offer comment,

If the marriage was conducted under Moroccan civil law, and you went through the not insubstantial hoops to get a proper civil marriage then the UK will recognise the marriage.
If you just got married with an imam then the uk will not accept the marriage.
However, marriage does not give any automatic right to reside and work in the UK.

Yes if Moroccan married certificate romanised in uk if is translated in English and stamped by home  office Moroccan from my experience