Andy Murray was so pissed that he couldn't take a piss during a marathon match at the Australian Open on Thursday night ... he unloaded on the chair ump, calling her refusal of a potty break a straight-up "joke."
Murray and Thanasi Kokkinakis battled for over FIVE HOURS at the famed tennis tournament in Melbourne ... and just the before the match went to its fifth set, Murray asked to hit the toilet.
The problem? He had already been once previously during the contest -- so, the ump refused his request.
And, that's when Murray snapped.
"Do you know something?" Murray said as it neared 4 AM in Australia. "I respect the rules. It's so disrespectful that the tournament has us out here until three, f***ing four o'clock in the morning and we're not allowed to go take a piss."
What is this insanity they got going on at the @AustralianOpen…can’t use the bathroom?!?!?
Murray continued, "It's a joke. It is a joke. And you know it as well. It's disrespectful. It's disrespectful to you, it's disrespectful to the ball children. It's disrespectful to the players and we're not allowed to go to the toilet. It's ridiculous."
Former No. 1-ranked tennis player Andy Roddick agreed with Murray ... writing on Twitter during the match, "This is just so dumb."
Murray somehow recovered despite not being allowed to relieve himself ... earning a 4-6, 6-7 (4), 7-6 (5), 6-3, 7-5 win that started on Thursday night and officially ended at 4:05 AM on Friday.
The 35-year-old will now face Roberto Bautista Agut in the tournament's third round on Saturday. Here's to hoping for no bladder issues then.