INDIO, Calif. -

A 35-year-old felon who carjacked an older couple in their motorhome last year and shot the man pleaded guilty Thursday to attempted murder and other felonies and was immediately sentenced to nearly 50 years in prison.

Jorge Luis Valdez of Coachella pleaded guilty Thursday afternoon to two counts of carjacking and one count each of attempted murder, being a felon in possession of a firearm and auto theft with a prior conviction.

Court records show he also admitted sentence-enhancing allegations of using a firearm in the commission of a felony. In exchange, prosecutors dropped three charges, including kidnapping during a carjacking, evading police and resisting arrest.

About 5:15 p.m. on April 10, 2014, Riverside County sheriff's deputies were told that a man with a handgun was trying to stop vehicles on northbound Highway 86 south of Dillon Road in Coachella.

The suspect, later identified as Valdez, carjacked a motorhome and forced the driver at gunpoint to go north on Highway 86, Deputy Armando Munoz said.

Valdez ``threatened the driver not to stop'' when deputies and California Highway Patrol officers tried to stop the motorhome. Spike strips laid down on Highway 86 brought an end to the chase, Munoz said.

Shortly after the vehicle came to a stop, shots were heard inside the motorhome. The woman came out, then Valdez, pointed a handgun at the deputies and officers, who fired at him.

He retreated back into the motorhome, but surrendered a short time later and was taken into custody.

The male victim was airlifted to a hospital, where he was treated for a gunshot wound. Authorities did not release the victims' names or ages.

Viewer Photos: Suspect crashes car in Coachella before carjacking two people in RV

POSTED: 08:26 AM PDT Apr 11, 2014    UPDATED: 08:49 AM PDT Apr 11, 2014 

Photos taken by viewer Gerardo Zaragoza. A suspect in Coachella crashed his car and then carjacked two people in an RV. The police chase ended in gunfire.

1 / 4

Courtesy of Gerardo Zaragoza