Date: 201709
Local time of day: 1201-1800
Location: ZZZ.Airport, US
Light: Daylight
Aircraft: B737-700
Operator: Air Carrier
Operating under: Part 121
Flight plan: IFR
Mission: Passenger
Flight phase: Climb
Airspace: Class B ZZZ
ATC / advisory: TRACON ZZZ
Second aircraft: Commercial Fixed Wing
Reporter organization: Air Carrier
Reporter function: Pilot Flying; Captain
Reporter qualification: Flight Crew Air Transport Pilot (ATP)
Human factors: Situational Awareness; Communication Breakdown
Second reporter function: Pilot Not Flying; Pilot Flying
Anomaly: ATC Issue All Types; Conflict NMAC; Deviation / Discrepancy - Procedural Clearance
Detector: Automation Aircraft RA
When detected: In-flight
Result: Flight Crew FLC complied w / Automation / Advisory; Flight Crew Became Reoriented; Flight Crew Took Evasive Action
Contributing factors: Airspace Structure; Human Factors
Primary problem: Human Factors

Narrative: I was the Pilot Flying on this flight and I will comment on what I remember. This whole incident literally lasted seconds from beginning to end. Shortly after departure we were given a 050 heading off the Departure and then given DIRECT to ZZZZZ intersection to join the SID and climb to 17;000 FT. Passing 8000 FT we received a TCAS alert for traffic at 9000 FT and 3 to 5 miles at our 11 position. Immediately ATC instructed us to maintain 8000 FT; which we replied that we were already passing 8600 FT and would descend to 8000 FT. I began the descent immediately and shortly received an RA. I turned off all automation and complied with the RA. I remember hearing 'Maintain Vertical Speed' during the descent. I did not descend to 8000 FT because my First Officer; the PM (Pilot Monitoring) had the corporate aircraft in sight and the RA was not telling us to. I maintained altitude as I saw the traffic pass below us from left to right. I remember the TCAS display showed the traffic 300 FT below us. The PM told ATC we had traffic in sight and was past us. I queried ATC about giving us a descent to 8000 FT where the traffic was. ATC said he was at 9000 FT. The traffic was certainly not at 9000 FT because we were at 8300 FT and he passed under us. TCAS certainly saved us this day. We assume the TCAS in the other aircraft was giving him a descend RA; since we were climbing but ATC gave us the descend; which probably made their TCAS descend them faster. The contradiction in TCAS RAs and ATC instructions certainly had us in the 'Red.' We were given a frequency change to Center and continued to destination. We ACARS'd a message to Dispatch as immediate notification but received no response. I called Dispatch by Phone.


Second narrative: Climbing out [via the SID]; assigned 17;000 FT; and passing 8000 FT; we received a TA for traffic 900 FT above us. We started looking for traffic. Moments later ATC told us to 'maintain 8000 FT;' By the time his transmission finished we were 8500 FT plus. As I was responding; the PF (Pilot Flying) started a pushover to comply with ATC directions. I responded '(call sign) descending 8600 FT for 8000 FT [RA went off] now responding to TCAS RA.' As I recall; the alert went off after we had started pushing over. The RA display on the ADI was the red chevron on the bottom pointing up. I heard MAINTAIN VERTICAL SPEED. PF was pushing the nose over when the RA went off and had to pull the nose back up to place the ADI wings on top of the chevron. The Navigation Display showed the target about 11 o'clock; 2NM; 200 FT low. I picked up the traffic; called it out to the PF and then clarified don't descend. As the traffic passed below us approximately 300 FT; I called back to ATC that the traffic was past us now. We queried the altitude of the traffic to which ATC responded he was at 9000 FT. We were dumbfounded at that point because he was below us and we were below 9000 FT. We then got a frequency change and started to try to sort out what had happened. Our only guess is that the other aircraft's TCAS told them to descend while ours told us to climb. During the fray; we heard ATC tell them to climb to 10;000 FT immediately; but we never heard their response. The conflicting instructions (ATC versus TCAS) put a lot of fog in the situation. I'm glad we both followed TCAS.It was very difficult in the moment to discern what was going on and where the safe path was. Everything happened so fast. ATC was trying their hardest to keep us under the other aircraft while TCAS (and our momentum) was trying to get us above them. Ultimately; it came down to following procedure (comply with TCAS RA versus ATC) that kept us out of harm's way. We can keep our scan up both on the ND and outside; but need to realize that these things develop very quickly.


Synopsis: B737 flight crew reported that while ATC asked them to descend and maintain altitude; TCAS told them to 'CLIMB' for traffic. TCAS and ATC were in disagreement.