Pierce Brosnan shared on “The Tonight Show” that he was almost The Batman in a movie.

Brosnan said he lost out on the role because of a tactless comment.

The role eventually went to Michael Keaton.

Brosnan was part of the James Bond franchise from 1995 to 2002.

The veteran said he didn’t care about the next actor selected for the role.

Brosnan will play Doctor Fate in “Black Adam.”

The film is the spin-off of DC’s “Shazam!”

Jaume Collet-Serra, the “Black Adam” director, said he needed a special actor to play Dr. Fate.

He said Brosnan was “magnetic” and right for the role.