Sometimes a part, says Ian McShane, has "got your name on it."

On Sunday, as Starz brings Neil Gaiman's Hugo Award-winning fantasy novel American Gods to series television, McShane takes on the name -- and the persuasive powers -- of Mr. Wednesday, a mysterious grifter whose offer of a job to an ex-convict named Shadow Moon (Ricky Whittle) kicks off one of TV's wildest road trips.

In a recent interview, here edited and condensed,  the British actor known for playing the eloquently foul-mouthed brothel-keeper in HBO's Deadwood  talked about American Gods as an immigrants' story, how he and Mr. Wednesday found each other, and how he believes gods should behave.

Q: Mr. Wednesday feels like a character who could almost have been written for you. How aware were you of the book before this?

A: I wasn't aware, actually, of the book at all. I worked with Neil Gaiman before, on one of his young adult books, called Coraline, which was a [stop-motion] animated film by Henry Selick. I took my grandkids to a showing in London, and we met before and he gave a chat. And I was impressed by him.

This came out of the blue last year. [Co-creator] Michael Green, who I'd worked with before on [an NBC] show called Kings, had offered me a part, but it wasn't Mr. Wednesday; it was a character called Czernobog, which is played much better than I would ever have done it, and brilliantly, by Peter Stormare. Anyway, the thing is I read it and I felt, "This is a fascinating script."  And I said, "Well, what about this guy Mr. Wednesday?" I'm lucky. I think they had it out to somebody else, I don't know who, and somebody said no to it. Who knows? Sometimes parts have got your name on it. And this one seemed to.

I mean, I'm sure I wasn't the first person they thought of for Al Swearengen. Being an Englishman. We've got this brothel-keeper in North Dakota in the [1870s]; they're not going to think of me as first choice. But as Wednesday would like to say, sometimes extraordinary things happen. And also the fact that they cast me with Ricky [Whittle] -- who obviously they cast first, because Shadow Moon's the protagonist of this story -- and it just happens that Ricky Whittle comes from the same part of the world [Lancashire], and he's a terrific kid, and we bonded instantly.

Q: You've played kings -- and you even got kind of biblical in Kings. Do you wonder why it took this long for someone to cast you as a god?

A: Yeah, it's about time. But there's only one way to play a god. Wednesday is a god who actually behaves like a normal human being, which is what I think  gods should be. Wednesday is just unendingly optimistic and funny and charming and capricious and as willful as any of the other gods that he supposedly despises. But you'll have a better time with Wednesday. Because the glass is always half-full with Wednesday.

He talks about coming to America, the immigrant story. I mean, this is Gaiman's big theme, I think, is that they bring their gods with them. The bad sort of entities, you know, the demons and the bad guys, were afraid to cross the ocean. But the immigrants weren't because they had optimism and hope, and they brought that with them. And we've forgotten a lot about that now. We are slavishly attuned to our iPhones and our iPads and all our technological goodies. I don't think Gaiman's saying you ignore all that, but just don't forget the past, forget what brought you to this point.

Q: You and Neil Gaiman are both Englishmen who've spent many years in America -- do you think the experience of being an immigrant means you see things in us that we don't see in ourselves?

A: I think, first of all, immigrants tend to go west, they don't go east. To go to America, you head west. Because this country, for all its glaring, obvious faults, is an amazing place to be. It's free in the best sense of the word. I mean, the fact that you can have the arguments about [politics], although they're getting a little silly at the moment, it's the freest country in the world. Wednesday professes it. When Shadow says, "So you've been other places," Wednesday says, "No. Just this country. I just travel around here because it's the freest place to be."

Q: Where does Al Swearengen rank in your list of favorite characters?

A: I think he's up there now, depending on how long we do with Mr. Wednesday. Al was great, and it was great working with [Deadwood creator] David Milch for three years. Any actor will tell you who worked on that show [they were] three of the best years in their creative lives, because of Milch and because of the atmosphere and because we were all in one location. It was like being in a repertory company, it was like doing stand-up, it was like a workshop, it was the best of any possible acting world you could imagine. Maybe we'll go on to that with American Gods, who knows?

Q: How confident are you that we'll see a Deadwood movie?

A: HBO, they've got the two-hour script. [Though the project is in development, HBO could not confirm as of Monday that a script had been received.]  You'd think they'd want to do it. The zeitgeist, it's perfect for it.

Q: I hate to put you on the spot, but American Gods co-creators Michael Green and Bryan Fuller  vs. David Milch -- compare and contrast.

A: Oh, I don't think I can. Because this is adapted material, and you've got to include Neil Gaiman. It's very much a triumvirate. I think they've added to his vision. Because we're not doing a novel here. We're doing a long-form TV version of a very much-loved novel, and you hope that people who watch the TV show will be inspired to read the novel. But David was coming from a whole other area when he invented Deadwood. That really was about the formation of America.

Working on any show, it's always good to have someone in the room who's smarter than you are. And David was definitely the smartest guy in the room. And the triumvirate of Green and Fuller and Gaiman, you're getting up there, too.