A320
Flight Crew Instrument; Flight Crew Air Transport Pilot (ATP); Flight Crew Multiengine
Time Pressure
Conflict NMAC
Flight Crew Took Evasive Action
Human Factors
On transition from Center to MCO approach; we were given a clearance to cross BAIRN int at FL110 on the BAIRN4 arrival. We had just switched to MCO approach while we were leveling at the assigned fix at the assigned altitude. As soon as we checked in; MCO approach alerts us to VFR traffic at twelve o'clock and four miles at FL105 and to climb and maintain FL120. In the seconds between the notification and execution of the order; I simultaneously scanned the ND and peered out the windscreen to visualize traffic while reaching to dial in the newly assigned altitude. As I pulled FL120 to command Open Climb; we got the RA to climb. We performed the memory items and executed. The last I saw the red traffic indicated by TCAS; it was 400 ft. below us. There is no reason this should have occurred. MIA and MCO controllers should have coordinated and issued an altered clearance well ahead of time to prevent the close incursion. This aircraft didn't just appear at the altitude; he was mode C equipped and the whole situation could have been prevented had the controllers done their jobs. Instead; and aircraft carrying approximately 140 souls onboard was forced to perform an evasive maneuver to avoid collision. Suggestions: ATC needs to pay attention 100% of the time and anticipate where aircraft are and where aircraft will soon be. I'm actually at a loss as to prevention. ATC is usually very good; especially MIA and MCO. But one moment of distraction by a controller can be catastrophic.
A320 Captain reported an NMAC event under ATC control during arrival.