VENTURA, Calif. -- A who was too intoxicated to drive made his 11-year-old nephew get behind the wheel to avoid being arrested for DUI, police said Wednesday.

Genoro Lopez, 29, was arrested just before 3 p.m. on Oct. 22 after a patrol officer in Port Hueneme, California, saw the boy driving a car headed northbound on Surfside Drive, according to police.

When the officer pulled the car over, police say he found Lopez intoxicated in the passenger seat with an open alcohol container and "displaying clear signs of intoxication," CBS Los Angeles reports.

Genoro Lopez Port Hueneme Police Department

During the traffic stop, police say dispatchers began receiving calls from drivers and other witnesses about a boy seen driving a vehicle with a male front passenger slumped in the seat.

Get Breaking News Delivered to Your Inbox

The boy initially told officers he was driving because his uncle was teaching him how to drive, but later admitted that Lopez was "too drunk to drive," police said.

Police asked Lopez to step out of the car and found an imitation firearm between the passenger seat and the door. He was immediately handcuffed and taken into custody.

A records check later revealed that Lopez had a warrant for being an unlicensed driver. It wasn't clear whether he was licensed at the time of his arrest.

Police say Lopez had used methamphetamine several hours before the traffic stop while caring for the 11-year-old boy, who was safely released into his mother's custody.

Lopez was charged with felony child endangerment and for having an open container of alcohol in the vehicle, along with an outstanding misdemeanor warrant.

He had previously been arrested by the California Highway Patrol in Ventura for drunk driving in May 2017, according to police.

His bail was set at $50,000.