Pope John Paul II was making an apostolic visit to Colombia in 1986 when a spontaneous encounter with a 10-year-old boy signaled the arrival of a new era in the papacy.

“I know you; you’re the Pope,” the child exclaimed as he approached the pontiff. “You’re the same one I saw on television.”

Several of his predecessors had appeared on radio and TV, but John Paul more than any pope before him harnessed the power of the media to reach the faithful and to project the image of vitality and holiness that defined him during his 26-year pontificate.

The co-architect of that image, John Paul’s confidant and chief spokesman, was Joaquín Navarro-Valls — a former psychiatrist, journalist and onetime bullfighter who led the Holy See’s media office for more than two decades.

Dr. Navarro-Valls, described during his tenure as the most visible Vatican official after the pope, died July 5 at his Roman residence. He was 80. Opus Dei, the Catholic organization to which he belonged as a celibate numerary, said the cause was pancreatic cancer.

Dr. Navarro-Valls holds a media conference at the Vatican in 2014. (Gregorio Borgia/AP)

Dr. Navarro-Valls was working as Rome correspondent for the Spanish daily ABC in 1984 when John Paul, then six years into his papacy, persuaded him to oversee the Vatican media operations.

The appointment of a suit-clad Spaniard was a startling change for the ordained members of the Italian-dominated Roman Curia. But John Paul had grown dissatisfied, according to biographer George Weigel, with what other Vatican officers called “the way we do things here.”

“It was revolutionary,” Weigel, the author of “Witness to Hope: The Biography of Pope John Paul II,” wrote in an email, not only because Dr. Navarro-Valls “was a layman but because he was a competent layman.”

Weigel joked that Dr. Navarro-Valls helped bring “Vatican communications into the twentieth century — the first-half of the twentieth century.” Even under his leadership, some journalists complained about the opacity of operations at the Vatican, comparing it to the Kremlin.

Particularly during the sexual abuse scandal that emerged in the early 2000s, in which church officials were shown to have systematically covered up rampant abuse by priests over generations, the hierarchy was widely seen as being slow to publicly and fully address the crisis.

But in the context of the Catholic Church, a supremely traditional organization whose leaders had long communicated with the congregation through formal addresses and by such means as the papal bull, John Paul represented an astonishing revolution.

Through Dr. Navarro-Valls’s careful choreography, John Paul became the pope millions of Catholics saw speaking to reporters aboard airplanes, “cradling children, praying at the Wailing Wall, hosting millions at an open-air Mass, chatting to Castro in Havana,” a reporter for the London Guardian once wrote.

John Paul, who was a patron of the conservative Opus Dei movement, displayed a deep affinity with Dr. Navarro-Valls. The two shared a direct phone connection and conferred with one another for up to two hours a day.

Under Dr. Navarro-Valls’s leadership, the Vatican opened its online information service, offered daily bulletins and issued statements in multiple languages. (Dr. Navarro-Valls spoke five.) It also became increasingly willing to challenge world leaders on behalf of the pontiff.

One noted incident came in 1994, when Vice President Al Gore represented the United States in Cairo at a United Nations conference on population concerns. The United States supported a U.N. statement of a woman’s right to “fertility regulation,” a position the Vatican considered tantamount to the defense of abortion rights.

Dr. Navarro-Valls rebuked Gore for suggesting, in that debate, a tie between the genocide in Rwanda and the African nation’s dense population.

“To this I could respond that the population density of Japan is much greater than that of Rwanda,” Dr. Navarro-Valls said, “and there is no danger of people killing themselves there.”

He was similarly blunt with Cuban officials when John Paul made his historic visit to the Communist nation in 1998. When the Cuban government proposed limiting TV coverage of the trip, Dr. Navarro-Valls wryly noted, according to Weigel, that the Cubans could not pretend to be unequipped for the event, as they had given “blanket coverage to the reinterment of Che Guevara.”

During the sexual abuse scandal, Dr. Navarro-Valls was criticized when he attempted to link homosexuality with child abuse, arguing in an interview with the New York Times that “people with these inclinations just cannot be ordained.”

But he played perhaps his most prominent role in the final days of John Paul’s life, as the pope succumbed to Parkinson’s disease. With the gravitas of his medical training, Dr. Navarro-Valls offered detailed updates on the pope’s health. At least one time, in a fashion uncharacteristic of a spokesman but revealing of his relationship with the pope, Dr. Navarro-Valls lost his composure.

John Paul died April 2, 2005. Dr. Navarro-Valls led the media office for not quite two years into the pontificate of his successor, Pope Benedict XVI, before retiring.

Joaquín Navarro-Valls was born in Cartagena, Spain, on Nov. 16, 1936. He studied medicine, specializing in psychiatry, at the universities of Granada and Barcelona and studied journalism at the University of Navarre in Spain, according to Opus Dei.

He joined the religious organization in his 20s and worked on its communications efforts after transitioning to journalism from medicine. He once told the Times that he was interested in “the question that arises in psychiatry of how the media in general, including advertising, influence human attitudes, both for better and for worse.”

He became president of the Foreign Press Association of Italy, a post that helped bring him to John Paul’s attention.

Survivors include three brothers.

In keeping with the traditions of spokesmen, Dr. Navarro-Valls sought to keep attention on his boss. An interviewer once asked him why John Paul “cared so much about relations with the media.”

“Your question could easily be turned around,” Dr. Navarro-Valls replied. “How is it that the media cared so much about John Paul II? . . . The reason for this interest, certainly, had to do with his magnificently expressive ways. But also, and perhaps most importantly, because of . . . the ideas and thoughts that his wonderful expressiveness clothed so well.”

CORRECTION: An earlier version of this obituary incorrectly reported Dr. Navarro-Valls’s survivors. Relying on information provided by Opus Dei, the obituary reported that he had one surviving brother. According to Opus Dei, he had three surviving brothers.