Date: 201508
Local time of day: 1201-1800
Location: RJJJ.ARTCC, FO
Flight conditions: IMC
Weather elements / visibility: Thunderstorm
Light: Daylight
Aircraft: Large Transport
Operator: Air Carrier
Operating under: Part 121
Flight plan: IFR
Mission: Passenger
Flight phase: Cruise
ATC / advisory: Center RJJJ
Reporter organization: Air Carrier
Reporter function: Captain; Pilot Flying
Reporter qualification: Flight Crew Air Transport Pilot (ATP)
Second reporter function: First Officer; Pilot Not Flying
Anomaly: ATC Issue All Types; Deviation - Track / Heading All Types; Deviation / Discrepancy - Procedural Clearance; Inflight Event / Encounter Weather / Turbulence
Detector: Person Flight Crew
When detected: In-flight
Result: General None Reported / Taken
Contributing factors: Weather; Procedure
Primary problem: Procedure

Narrative: [Inbound to Asia] we were heading west on R220; 'N route' passing NIPPI and approximately 180 NMs from NOGAL [when] our on-board weather radar started painting a significant line of showers on the N track all the way south to the O track of the NOPACs. Our flight conditions at the time were IMC with light turbulence. I contacted the flight attendant who was stationed at the forward galley to pass along to all of the other flight attendants to please take their seats. (Side note; the flight plan forecasted turbulence values at NIPPI was a 3 and NOGAL was a 2. With that information; I briefed the Purser at the gate that [we] were forecasted turbulence 9 hours into the flight). We were given clearance from Tokyo (Fukuoka RJJJ) to climb to FL350. We were unable to climb any higher due to airplane performance. At FL350; we were still IMC with the on-board weather radar still showing the significant rain showers ahead of our flight path. We discussed that we needed to get relief from our flight path and go 20 NMs right (north) of track N for weather. FO utilizing CPDLC with RJJJ; requested a 20NM OFFSET right of course for weather. RJJJ responded quickly 'UNABLE DUE TO AIRSPACE RESTRICTION'.  We then asked RJJJ via CPDLC for a 10NM right OFFSET for weather. RJJJ responded quickly stating; 'SORRY; WE CAN NOT ACPT RIGHT SIDE DUE TO AIRSPACE RESTRICTION'.The significant rain showers were now closing in on our flight path. We switched to Tokyo HF; frequency 13273 and spoke to Tokyo directly telling them that we needed to come right for weather. The Tokyo radio operator responded; 'UNABLE; AIRSPACE RESTRICTION'.It was that moment; which for the SAFETY of the passengers and of the crew that I told the Tokyo radio operator that 'I was exercising my Captain's Emergency Authority and turning right to deviate from the showers'. The Tokyo radio operator responded again; 'UNABLE YOUR REQUEST'. I then responded with 'MAYDAY; MAYDAY; MAYDAY; [FLIGHT] IS OFFSETTING RIGHT OF TRACK 10NM FOR WEATHER. WE WILL ADVISE ATC WHEN WE ARE CENTERLINE TRACK 'N'. FO loaded a 10NM right offset in the FMC and we proceeded with the offset. I made a radio transmission on VHF 123.45 to all traffic that might be nearby of our intentions. We stayed on the 10 NM offset for approximately 10 minutes missing the severe weather radar returns. We were still IMC with ride conditions approaching MODERATE turbulence.Once clear of the significant weather; we removed the 10 NM offset in the FMC and proceeded back on track 'N' centerline. We contacted Tokyo on the same HF frequency and told them that we were back on centerline and clear of weather. Tokyo acknowledged our call and said thank you. I called the flight attendants who were at their station if all was all right? They told me that all was fine in the cabin.[Later] I free texted Dispatch the following; '[EARLIER TODAY] I EXERCISED MY CAPTAINS EMERGENCY AUTHORITY; THUNDERSTORMS 180 NM EAST OF NOGAL/ DEVATED R10NM FOR 10 MINUTES BACK ON COURSE MODERATE TURBULENCE'. Dispatch never responded to my free text message. FO and I plotted on our charts what a 10NM offset on track N would look like on our Pacific Orientation chart showing we were at least 25 NM from the 'Petro... UHPP' FIR. Would I do this again if placed in the same situation? For the safety of the passengers and the crew; yes; definitely and without hesitation.


Second narrative: The ability to deviate for weather in both directions is very important. If we can't reliably expect to be able to deviate as we see appropriate for dynamic weather events/situations; especially where airspace restrictions are critical; then maybe we shouldn't be filed on that route when weather is forecast.


Synopsis: Air carrier flight crew reported deviating from cleared track in RJJJ airspace to avoid weather even though ATC refused to clear the deviation.