Dash 8-300
Flight Crew Air Transport Pilot (ATP)
Distraction
ATC Issue All Types; Deviation - Altitude Excursion From Assigned Altitude; Deviation / Discrepancy - Procedural Clearance; Deviation / Discrepancy - Procedural FAR
Flight Crew Returned To Clearance; Flight Crew Took Evasive Action
Airspace Structure
We had just departed ZZZ from Runway XXC. Climbing through approximately 3500; ATC alerted us to traffic on our climb out. Climbing through 3500ft we received a TA from our TCAS system. I notified ATC that we had received a TA.We were level at 4000ft heading 270. We received an RA to descend. We complied with the RA; notified ATC of our descent in compliance with the RA. At 3840 ft; TCAS notified us 'clear of traffic'. We climbed back to 4000 and notified ATC that we were climbing back to our altitude. ATC had pointed out traffic to us. I told him when we received a TA that we had received a TA to give him a heads up in case we received an RA. When we got the RA and notified him that we were descending in compliance with the RA; he said; 'I pointed that traffic out to you.' I told him that I was required to comply with the RA.
A Captain reported receiving a traffic alert (TA) during climbout. This was followed by an RA which commanded a deviation from the cleared climb profile. After the RA was resolved; a normal climb was resumed.