Devil in the details

Posted by Lucy on September 21, 1999

Can anyone tell me the meaning and/or origin of this phrase?
"The devil is in the details."

A friend of mine read somewhere another take on this phrase:
"God is in the details."

What do these phrases mean?

Thanks.