Date: 202201
Local time of day: 0601-1200
Location: MIA.TRACON, FL
Flight conditions: IMC
Aircraft: Commercial Fixed Wing
Operator: Air Carrier
Operating under: Part 121
Flight plan: IFR
Mission: Passenger
Flight phase: Initial Climb
Airspace: Class B MIA
ATC / advisory: TRACON MIA
Second aircraft: Any Unknown or Unlisted Aircraft Manufacturer
Reporter organization: Air Carrier
Reporter function: Pilot Not Flying; Captain
Reporter qualification: Flight Crew Multiengine; Flight Crew Instrument; Flight Crew Air Transport Pilot (ATP)
Human factors: Time Pressure; Communication Breakdown
Second reporter function: First Officer; Pilot Flying
Anomaly: ATC Issue All Types; Conflict NMAC; Deviation - Altitude Excursion From Assigned Altitude; Deviation - Track / Heading All Types; Deviation / Discrepancy - Procedural Clearance
Detector: Automation Aircraft RA; Person Flight Crew
When detected: In-flight
Result: Flight Crew Took Evasive Action; Flight Crew FLC complied w / Automation / Advisory
Contributing factors: Airspace Structure; Procedure
Primary problem: Procedure

Narrative: Flight took off at XA32Z and was on departure from Miami International airport; with the First Officer (FO) flying and the Captain (CA) operating as Pilot Monitoring (PM). The flight was given a 090 heading on departure until 2000 ft. when Departure Control (Frequency 119.45) directed a vector to the North and cleared the flight to climb to 7;000 ft. At XA35Z; the flight was level at 7;000 ft. in Instrument Meteorological Conditions (IMC) and Departure Control ordered 'Turn right to 090'. Read back the radio call and began an immediate right turn. While turning; Departure advised there was another aircraft somewhere at 11 o'clock and 1000 ft. below Aircraft X (which was unseen because of IMC). Immediately after making the traffic call; at XA36Z; Departure Control ordered an 'Immediate Left turn to 070'. Aircraft X rolled from a right hand turn into a left hand turn and attempted to comply; while the CA read back the instructions. While attempting to comply; just as the turn was reversing; Aircraft X was approximately over the KR66U fix and received a RESOLUTION ADVISORY (RA) that stated 'DESCEND!; DESCEND!'. The FO expeditiously put the aircraft in the RA window on the display; and correctly executed the RA maneuvers. The CA broadcast our RA compliance on frequency 119.45 and the TCAS indicated a contact immediately off our nose at our exact altitude. As Aircraft X descended through 6;850 ft. (shortly after the RA maneuver began); the TCAS aural alert 'Clear of contact' announced. The CA then transmitted to Miami's Departure in Frequency 119.45 that we were clear of contact and able to return to the 7;000 ft. and 070 heading as ordered. At this time; Departure cleared Aircraft X to climb and gave another course correction to a 090 heading. The flight continued without further incident. ATC vectored us into a near miss with another aircraft. Review routing/congestion issues in Miami Departure Control.


Second narrative: Departed at XA32Z and was on departure from Miami International airport; with the First Officer (FO) operating as pilot flying (PF) and the Captain (CA) operating as Pilot Monitoring (PM). The flight was given a 090 heading on departure until 2000 ft. when Departure Control (Frequency 119.45) directed a vector to the north and cleared the flight to climb to 7;000 ft. At XA35z; the flight was level at 7;000 ft. in Instrument Meteorological Conditions (IMC) and Departure Control ordered 'Turn right;' to a specified heading. Aircraft X read back the radio call and began an immediate right turn. While turning; Departure advised there was another aircraft somewhere at 11 o'clock level at 6000 ft. Immediately after making the traffic call; at XA36Z; Departure Control ordered an 'Immediate Left turn to another specified heading. Aircraft X rolled from a right hand turn into a left hand turn. While in the left turn; there was a RESOLUTION ADVISORY (RA) that stated 'DESCEND!; DESCEND!'. The FO expeditiously put the aircraft in the RA window on the display; and correctly executed the RA maneuvers. The CA broadcast our RA compliance on frequency 119.45 and the TCAS indicated a contact immediately off our nose at our exact altitude. As Aircraft X descended through 6;850 ft. (shortly after the RA maneuver began); the TCAS aural alert 'CLEAR OF CONTACT' announced. The CA then transmitted to Miami's Departure in Frequency 119.45 that we were clear of contact and able to return to the 7;000 ft. The flight continued without further incident. ATC Error. Lots of traffic in the area at the time of the occurrence. De-congesting the airspace by spacing the arrivals and departures.


Synopsis: Flight crew reported taking evasive action after receiving a TCAS RA while on departure.