O.K., Peter Doig may have tried LSD a few times when he was growing up in Canada during the 1970s. But he still knows, he said, when a painting is or isn’t his.

So when Mr. Doig, whose eerie, magical landscapes have made him one of the world’s most popular artists, was sent a photograph of a canvas he said he didn’t recognize, he disavowed it.

“I said, ‘Nice painting,’” he recalled in an interview. “‘Not by me.’”

The owner, however, disagreed and sued him, setting up one of the stranger art authentication cases in recent history.

The owner, a former corrections officer who said he knew Mr. Doig while working in a Canadian detention facility, said the famous painter indeed created the work as a youthful inmate there. His suit contends that Mr. Doig is either confused or lying and that his denials blew up a plan to sell the work for millions of dollars.