Peter Capaldi
Peter Capaldi has been announced as the next leading man on BBC’s “Doctor Who.” BBC

Peter Capaldi has been announced as the 12th Doctor, the next titular leading man of the long-running British science-fiction television series “Doctor Who.” Capaldi will be the next in a long line of actors to portray the Doctor, a time-traveling hero capable of regenerating himself.

In the U.S., the announcement came Sunday afternoon during a live half-hour special on BBC America, “Doctor Who Live: The Next Doctor.” Steven Moffat, the “Doctor Who” showrunner, was on hand to make the announcement, while current Doctor Matt Smith sent a videotaped message of congratulations to his successor.

“There comes a right time for the right person to play it,” Moffat said. “We all had the same idea, and it was a quite different idea.” He added that, after seeing Capaldi’s audition tape, “Everybody saw it and was like, ‘That’s the Doctor.’”

Capaldi, 55, will make his first appearance as the 12th Doctor this Christmas in a seasonal special episode.

“It’s so wonderful not to keep this secret any longer,” Capaldi said during the show Sunday. “I haven’t played Doctor Who since I was 9 on the playground.”

The Glaswegian Capaldi is best known for his foul-mouthed roles in the film “In the Loop” and the TV series “The Thick of It.” This year, the lifelong “Doctor Who” fan made an appearance as a World Health Organization doctor in the movie “World War Z.” Capaldi has also appeared in “The Fires of Pompeii,” “Neverwhere” and the “Doctor Who” spin-off “Torchwood.”

While he’s known largely for his artful cursing, he insisted his language will remain PG on “Doctor Who.”

Smith may be about to hand the reins over to Capaldi, but he’ll still make one more appearance as the Doctor before the Christmas special. Smith is scheduled to appear as the 11th Doctor in a 50th anniversary special featuring another past Doctor, David Tennant, who took up the role of the 10th Doctor in 2005. The 90-minute special will be shown Nov. 23, exactly 50 years after the first episode of “Doctor Who” premiered in 1963.