Game of Thrones” star Nikolaj Coster-Waldau is probably best known for playing Jaime Lannister, but he’s also apparently a bit of a prankster.

Coster-Waldau decided to play a joke on his “Game of Thrones” bosses about his hair several seasons ago, but he said it almost got him in legal trouble with HBO.

"There'd been a lot of talk about Jaime's hair in the early seasons — his long golden locks," he told Digital Spy. "Once he lost his hand, I thought he should maybe have a haircut. And then I thought, 'Why don't I just pretend?'”

‘GAME OF THRONES’ STAR JOE DEMPSIE REVEALS THE SECRET TO STAYING ALIVE ON THE SHOW, HOW HE UNDERESTIMATED FANS

“I sent them an old picture where I had a buzz cut,” the 48-year-old actor continued. “I sent a long letter where I explained I'd taken control of my character and I want to be respected. I said that my integrity as an artist was at stake."

At first, he said, nobody responded to his letter. However, when he arrived in Belfast to start back up with filming, he got a frightened call from the first assistant director of the show who said the head of the hair department was frantically working on making a wig.

"I said, 'It's just a joke! Did you really believe?' They all believed it,” Coster-Waldau said. “They'd also called my manager. HBO had started to talk about suing me and it had gotten out of control."

‘GAME OF THRONES’ STAR NIKOLAJ COSTER-WALDAU SAYS NO ONE HAS GUESSED SHOW’S ENDING

On Tuesday night, Coster-Waldau played a prank with fewer consequences on “Jimmy Kimmel Live.”

The star was discussing fan theories with the late-night host when he suggested one prediction he thought might come true — though it ended up being a joke about a soccer team in the U.K.

“There’s also this thing about a guy called Bielsa, which is a guy who comes and magically transforms this world for the good,” Coster-Waldau said, explaining the fake fan theory.

Though Kimmel fell for the joke, the actor eventually admitted it was a reference to Marcelo Bielsa, the manager of Leeds United.