It’s probably not the best idea to try to outsmart a roomful of chess grandmasters. Gaioz Nigalidze found that out the hard way when officials at the Dubai Open Chess Tournament in the United Arab Emirates caught him cheating with help from a smartphone hidden in a restroom.

Nigalidze, winner of the Georgian chess championship in 2013 and 2014, was busted after he took multiple breaks from his sixth-round match against Armenia’s Tigran Petrosian to use the lavatory. Tournament referees were extra suspicious because Nigalidze seemed to need to relieve himself at particularly tense points during the game.

When officials found a phone in one of the bathroom stalls, Nigalidze denied owning it, but it was discovered he had logged into a chess analysis app using his own name.

“In our game today Nigalidze would promptly return my moves and then literally run to the toilet,” Petrosian told Chess News. “Twice, I made my moves promptly as well so that he couldn’t leave, and he made mistakes on those occasions. Then I decided to keep an eye on him. I noticed he would always visit the same toilet partition, which was strange since two other partitions weren’t occupied.”

Nigalidze was immediately ejected from the tournament and faces a three-year ban from all tournaments, though that could turn into a 15-year ban if he’s found to be a repeat offender. Both he and Petrosian are chess grandmasters, the highest title a player can earn aside from Chess World Champion.

This isn’t the first time chess players have been caught seeking outside help during a high-stakes matchup. Cell phones, with their small size and powerful intelligence, have been found concealed in player’s clothing. They also a facilitated a cheating ring between two French grandmasters and an international master who were accused of using text messages and complicated body movements to relay a message from a sophisticated computer program.