A319
Flight Crew Total 10000
Communication Breakdown; Situational Awareness; Training / Qualification
ATC Issue All Types; Conflict Ground Conflict; Critical
Flight Crew Took Evasive Action
Human Factors; Procedure
Landed on XX and exited runway.  Tower said P W to the ramp and so I taxied forward. First Officer switched to Ground frequency and I saw the 777 on Papa Taxiway coming toward us not slowing down so I put on brakes.  At same time I heard [the] Controller tell us to stop two times which I already had done.  The wingtip of the 777 missed our windshield by about 20 ft.I think that area is deadly because of tower giving taxi instructions to landing aircraft & then handing them off to Ground Control who has already given the foreign flights taxi instructions many minutes earlier from the international terminal and relying on dumb luck that the aircraft exiting the runways don't taxi in front of the foreign carriers on Papa of whom English may not be a primary language and are not listening to the Tower anyway. Also ZZZ is a training airport for ATC.ZZZ Ground control should automatically give the carriers coming out of the international terminal going to [Runway] XY or XX taxi instructions to taxi via P hold short of U. This will enable conscious positive control of this problematic intersection area and allow aircraft exiting Runway XX or crossing XX to taxi clear of the runway without conflicts with large international aircraft outbound.
A319 flight crew reported a ground conflict with a 777 during taxi to gate.