While flying over China on Thursday, Pope Francis sent a telegram to President Xi Jinping and the Chinese people. His message was seen as a possible sign of thawing relations between China and the Vatican.

But such hopes were dashed almost immediately as reports emerged that Chinese officials were blocking some Chinese Catholics from participating in the pope’s five-day visit to South Korea.

Meanwhile, the pontiff received an even more unfriendly signal from North Korea, which fired three short-range rockets shortly before his arrival in Seoul.

The pope routinely sends messages while flying over different countries, but Thursday’s was singled out because it was the first time that China had allowed a pope to fly through its airspace since issuing a refusal in 1989.

“I extend my best wishes to your excellency and your fellow citizens, and I invoke divine blessings of peace and well-being upon the nation,” Francis said in the telegram to Xi on his way to Seoul.

The Vatican and China have been on uneven terms since the Communist Party took power in 1949 — as both sides have sought control over Catholics in China. But in recent years, the relationship has hit its lowest point in decades.

Bishops touted by the Chinese government were excommunicated by the Vatican. Meanwhile, China’s government called the Vatican “unreasonable and rude” and stepped up its surveillance and detention of Catholics who worship in illegal churches and remain loyal to the pope.

The fight between two of the world’s most hierarchical and authority-driven powers has become so fraught that, according to the Vatican, Chinese authorities have in some cases kidnapped bishops approved by Rome and pressured them into laying hands upon government-chosen bishops at their ordinations — a move meant to lend such ceremonies legitimacy despite Vatican opposition.

The Vatican also maintains diplomatic relations with Taiwan, a source of anger for Beijing.

For those reasons, papal travels through the region — which in the West frequently draw huge headlines — have often been largely ignored in the Chinese news media.

But Thursday’s flyover drew plaudits in China’s state-run media.

The often-nationalistic Global Times called it a “positive development in China-Vatican relations,” but the newspaper cautioned that it would take much time for the two to establish formal diplomatic relations.

Meanwhile, a spokesman for the Committee for the Papal Visit to Korea told reporters that several dozen Chinese were prevented from attending an Asian Youth Day event during the pope’s South Korea visit because of “a complicated situation inside China.”

Because this is Francis’s first tour through Asia, some have speculated that he would try in some way to send messages beyond South Korea to followers in China and to Christians in North Korea living under hardship.

In China, the government lately has drawn renewed international criticism for its crackdowns on religion. In February, local officials in the eastern province of Zhejiang began a campaign to demolish church buildings that “violated government regulations” because of their prominent crosses.

More recently, foreign news outlets have reported that China is also cracking down on Christian charity groups near its border with North Korea.

Gu Jinglu contributed to this report.