Dennis Quaid Avoids DUI by a Hair

10/22/2009 10:30 AM PDT

Dennis Quaid Avoids DUI by a Hair

Dennis Quaid is a lucky man ... because last night he was about 1 inch away from getting arrested for DUI.

It happened at Philippe restaurant in West Hollywood early this morning. Quaid, his wife Kimberly and a friend walked outside and the valet had already brought the car up ... the motor was running.

They got in -- Quaid behind the wheel. It looks likes Quaid may have moved the car a foot when a cop pulled up alongside and urged Quaid not to drive.

Dennis responded that he didn't want to drive. The cop repeatedly said, "Get out of the car." Quaid responds, "What do you want me to do." Quaid then asked the cop if they could go back inside the restaurant and the cop said yes.

They went inside and came out a short time later to a waiting cab. The paps screamed "You don't want a DUI. You don't want to end up like Mel Gibson." Everyone, including Dennis, laughed and they drove away.