I've had an interview for the job in the company A and they offered quite a good contract to me and sent the Offer Letter. After the offer letter I have to pass the background check which the company promised will take 2 weeks in average. There was a delay from my side preparing the documents for background check, so 1 week passed there.
The problem is, by law I have to have a signed contract and be already working in a bit more than 3 weeks, although background check might take around 4 weeks, at worst 5 weeks. In this case I'm left in quite a pickle, and that quite does not satisfy me.
On the other hand as a safe measure I was finishing interviews for company B and they are presenting a contract to me that is on a safe side of things - I can start in 2 weeks and my documents and staying in country are safe.
I'm currently in consideration what to do next, and the question here is:
I have signed offer letter, but not actual contract with company A. Can I legally safely decline it, being in a background check and explaining that the situation became too risky for me?