Date: 201808
Local time of day: 0001-0600
Location: ZZZZ.Airport, FO
Flight conditions: VMC
Aircraft: Commercial Fixed Wing
Operator: Air Carrier
Operating under: Part 121
Flight plan: IFR
Flight phase: Climb
Airspace: Special Use ZZZZ
Reporter organization: Air Carrier
Reporter function: Pilot Not Flying; Captain
Reporter qualification: Flight Crew Air Transport Pilot (ATP); Flight Crew Multiengine; Flight Crew Instrument
Human factors: Time Pressure; Situational Awareness
Second reporter function: First Officer; Pilot Flying
Anomaly: ATC Issue All Types; Airspace Violation All Types; Conflict Airborne Conflict
Detector: Person Air Traffic Control; Person Flight Crew
Result: Air Traffic Control Issued Advisory / Alert; Air Traffic Control Issued New Clearance; Flight Crew Exited Penetrated Airspace; Flight Crew Took Evasive Action; General Flight Cancelled / Delayed
Contributing factors: Airspace Structure; Human Factors; Procedure
Primary problem: Airspace Structure

Narrative: FO (First Officer) PF (Pilot Flying) Captain PM (Pilot Monitoring) TOGW 294.0. Departed runway XX at ZZZZ and assigned the ZZZZZ departure. After ZZZZZ1 cleared to ZZZZZ2 flight plan route. We were established on track (194 deg.) to ZZZZZ1 climbing to FL 260. Climb speed was 325-330 knots and we were passing approximately FL190. Prior to reaching ZZZZZ1; ATC advised active military airspace ahead in 10 miles and to turn right to heading 360 'sharp turn'. Also; ATC advised they had a clearance and advise ready to copy. The FO initiated the turn with heading select and the aircraft started a right turn but only a 15 degree bank turn. About half way through the turn ATC advised to continue turn to heading 050. I disconnected the autopilot and manually increased the bank to 30 degrees. During the turn; we received a TA and the AC (aircraft) was approximately 5 miles from us and we did inadvertently enter the airspace. ATC did not inform us one way or the other if we penetrated the restricted area. We completed the turn and were cleared direct to ZZZZZ2 without further incident and no comment from ATC.Upon hearing the 'sharp turn' and noticing the AC only turning at 15 degrees; should have instructed the FO to disconnect and increase bank 25-30 degrees. ATC could have given us a little more notice of the airspace ahead


Second narrative: Departing at night on the ZZZZZ departure just after ZZZ; the aircraft was accelerating through 320 knots ATC told us to make a tight right turn to a heading of 360. The autopilot was on and the pilot flying FO (First Officer) immediately changed the lateral mode to HDG SEL and dialed right to 360. The aircraft started the turn to 360 at about a 20 degree bank; but due to our high speed; the turn radius was quite large. Soon the Captain realized the traffic threat ahead of us as they came up on the TCAS. He quickly took control of the aircraft; turned off the autopilot; and executed an evasive maneuver to avoid the oncoming traffic. Despite his best efforts; the traffic was too close; we were going too fast; and the aircraft was too heavy to react quickly. We split a pair of tactical aircraft as they orbited over a military operation on the ground below. Lateral separation was difficult to judge; but I watched as we missed them vertically by 500 feet and 1500 feet respectively. We never received an RA; as the Captain worked to keep the aircraft climbing throughout the maneuver; but we did get a brief Traffic alert. Despite the close proximity; we never saw the aircraft and they never saw us; as we were all operating at night in a hostile area with all lights off. Perhaps evasive action could have been taken immediately to improve the separation; instead of starting with an automated turn; but the imminent threat to us was never conveyed in the ATC transmission.


Synopsis: Air carrier flight crew reported entering restricted military airspace and conflicting with tactical aircraft in the airspace.