RIYADH, Saudi Arabia — Saudi Arabia scrambled Friday to withdraw a school textbook that accidentally included a doctored photograph of a former ruler sitting next to a “Star Wars” character, prompting ridicule on social media.

The black-and-white image shows King Faisal, Saudi Arabia’s third monarch, signing the United Nations Charter in 1945, with the diminutive Jedi master Yoda perched next to him.

The image was created by 26-year-old Saudi artist Abdullah al-Shehri, renown for mixing pop culture icons into historic photographs.

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

Remember when Yoda signed the United Nations charter back in 1945 with Faisal of Saudi, @starwars? Saudi Ministry of Education does! pic.twitter.com/T62mwtZppr — SilentRuins (@SilentRuins) September 21, 2017

“The Ministry of Education regrets the inadvertent error,” Saudi Education Minister Ahmed al-Eissa said on Twitter.

He said the ministry had begun recalling the textbook and printing a corrected version, adding that a legal committee would be formed to determine the source of the error.

Al-Sheri told The New York Times that he was surprised to see the photograph end up in the school textbook.

He said he paired the king and Yoda as they were both intelligent and because Yoda’s green skin and light saber matched the green of the Saudi flag.

He stressed he had meant no offense to the king, seen widely as the architect of Saudi Arabia’s modernization.

But the error prompted light-hearted banter on social media.

One Saudi schoolteacher jested that this error symbolised “payback” after the education ministry introduced an extra hour of classes in schools earlier this year.