Dan Fogler is set to play Alfred Hitchcock in the indie thriller “Number Thirteen,” which Chase Palmer wrote and will direct.

Ewan McGregor and Geoffrey Rush are circling the other lead roles.

Pic will be financed by Union Square Entertainment, whose principals, Jason Berk and Matt Lane, will produce with Gail Mutrux. Shooting begins in January.

Drama centers on Hitchcock’s lost and unfinished first film, “Number Thirteen.” In this drama, the helmer gets caught up in a Hitchcockian dilemma when he ends up in a love triangle with two crew members while making the film. When the lead actor turns up dead, the editor suspects the director and tries to uncover the truth.

Fogler, who won a Tony for his turn in “The 25th Annual Putnam County Spelling Bee,” stars in the upcoming “Fanboys,” “School for Scoundrels,” “Balls of Fury” for Rogue and Spyglass and “Good Luck Chuck” at Lionsgate.