Updated

Mel Gibson is seriously considering suing Joe Eszterhas for secretly recording him at his home in Costa Rica last December, and then releasing the audio rant, TMZ has learned.

Sources connected with Gibson tell TMZ that the actor believes he has a "basic human right" not to be secretly recorded in his own home. 

TMZ is told Gibson's people are looking at the laws of Costa Rica to determine if recording laws were violated and, even if they weren't, if Gibson's right of privacy was violated by the release of the audio.

Gibson explodes in the recording about Eszterhas' lack of progress with "The Maccabees" script  -- "What the f**k have you been doing!!"  He also unloads on Oksana Grigorieva, calling her a ""F**king c**t, c**ksucking whore."

TMZ has been told that Gibson believes anyone recorded "at their worst moment" would sound awful, and it's unfair to trap people in their refuge.

One Gibson source notes with skepticism that Eszterhas has made other allegations against Gibson  -- that the actor also ranted against the Jews and expressed pleasure that John Lennon was shot and killed, but none of that is on the tape.

Click here for more from TMZ