Al Pacino has put his brand on a number of unusual characters in the past, but he seems particularly well suited to portray an eccentric just about his own age in “Phil Spector” (HBO, 9 p.m.), the new film premiering tonight.

He’s a reliable tool in the arsenal of David Mamet, who wrote and directed this unusual work that focuses on the preparations of the first trial of the famed record producer charged with the murder of a faded starlet unlucky enough to have ended up in Spector’s castle late one night after working a shift at the House of Blues.

Helen Mirren plays the defense attorney Linda Kenney Baden who has to get up to speed in a hurry from New York lawyer Bruce Cutler, played by Jeffrey Tambor. It isn’t until 15 minutes into the film that she gets a load of him in his home.

There in the dark hilltop castle, mounted with trophies from Lennon to Lincoln, wearing a golden wig and black silk pajamas decorated with tigers, the record producer for artists from the Ronettes and the Righteous Brothers to the Ramones is immediately off on a rant about a 1968 single he had nothing to do with, “Abraham, Martin and John.”

Like Spector, Al Pacino’s performance in the role is mesmerizing and inscrutable from the start.

To the crazy eyes, all he has to add are the crazy wigs that were, the film seems to say, Spector’s final undoing at trial.

But Mamet’s got an axe to grind here, siding with the producer and creating a case that the death was a suicide, which is at odds with what actually happened in the courtroom.

Still, the film begins with an extraordinary disclaimer:

“This is a work of fiction. It’s not ‘based on a true story.’ It is a drama inspired by actual persons in a trial, but it is neither an attempt to depict the actual persons, nor to comment upon the trial or its outcome.”

It’s a fast moving piece, full of speedy back and forth that is the hallmark of Mamet’s plays, and some scenes look like they may have worked better as a two character work on the stage. But it’s slyly directed, though, to have the audience experience the same kind of exasperation as the defense attorney at Spector’s final, crazy stab at a Jimi Hendrix homage that only made him appear to be as crazy as everyone expected him to be.