Date: 201512
Local time of day: 1201-1800
Location: ONT.Airport, CA
Flight conditions: VMC
Light: Daylight
Aircraft: B737 Next Generation Undifferentiated
Operator: Air Carrier
Operating under: Part 121
Flight plan: IFR
Mission: Passenger
Flight phase: Climb
Airspace: Class E SCT
ATC / advisory: TRACON SCT
Second aircraft: Any Unknown or Unlisted Aircraft Manufacturer
Reporter organization: Air Carrier
Reporter function: First Officer; Pilot Flying
Reporter qualification: Flight Crew Air Transport Pilot (ATP)
Second reporter function: Pilot Not Flying; Captain
Anomaly: ATC Issue All Types; Conflict Airborne Conflict
Detector: Automation Aircraft RA; Person Air Traffic Control
When detected: In-flight
Result: Air Traffic Control Issued New Clearance; Air Traffic Control Issued Advisory / Alert; Flight Crew Took Evasive Action
Contributing factors: Procedure; Airspace Structure
Primary problem: Ambiguous

Narrative: Our takeoff altitude limit was changed from 7;000 feet as per the Pre Departure Clearance (PDC) to 'climb and maintain 3;000'' after takeoff. We took off; I was flying; and then we received a clearance from Departure Control to climb to 4;000 feet. Then we were given a climb to 6;000 feet. I did notice multiple TCAS targets in the area. Then we were given a Controller change. He called us without us checking-in and gave us an immediate descent to 4;000 feet. I reacted quickly to initiate a descent to 4;000 feet. Passing around 5;000-5;500 feet; we received a significant climb RA opposite of what ATC was telling us to do. Again; I reacted promptly to initiate and follow the climb RA as instructed and taught to do so. I followed the TCAS RA advisory until 'Clear of Conflict' was heard and a climb to 14;000 feet was given to us by ATC. I have always been taught to follow a TCAS RA instructions. That is great technology; and the rest of the flight was uneventful.Perhaps change the departure procedure out of Ontario; or have the airspace more clear through that valley on the PRADO. There were a lot of VFR targets. Maybe even a VFR corridor.


Second narrative: I was pilot monitoring from ONT on the PRADO Departure from Runway 26R; our clearance was initially to 4;000 feet. Soon after takeoff; Departure cleared us to 3;000. There was much traffic south of ONT at this time. On Departure frequency; the [controller] then cleared us to 4;000 feet; and then to 6;000 feet. We switched to Departure frequency and as we were climbing through approximately 5;500'; [ATC] told us to immediately descend to 4;000 feet. The pilot flying disconnected the autopilot and began an immediate descent towards 4;000 feet when soon after we got a significant climb RA opposite to his call. We immediately responded to the climb RA and called Departure to let him know we were responding to a climb RA. He then cleared us higher and there was no further conflict.I am not sure what happened to cause this problem. However; we immediately responded to the Controllers call to descend; and then immediately followed the subsequent significant climb RA thinking that the Controller's direction might have been in error.


Synopsis: B737 flight crew departed ONT on the PRADO departure and was cleared to 6;000. The next Controller gave them an immediate descent to 4;000 feet and the climb was reversed just as the TCAS issued a climb RA which was complied with.