Taipei, Taiwan — China is giving Taiwan a rare chance to join a United Nations event this week, showing the strength of a new relationship that was once considered impossible due to decades of hostilities between the two political and military rivals.

China, backed by about 170 diplomatic allies, normally bars Taiwan from any role in international agencies that require statehood of its members. Although China has regarded Taiwan as part of its territory since a civil war in the 1940s, it is softening its tone by allowing Taiwan special guest status at a UN aviation agency’s general assembly in Montreal.

The International Civil Aviation Organization’s special pass to Taiwan follows a positive cue last year from former Chinese president Hu Jintao during an Asia-Pacific Economic Cooperation meeting, Taiwan’s foreign ministry says.

Taiwan wants a bigger UN role as it faces pressure at home to assert itself more internationally following the 1971 loss of its UN seat when the global body recognized China. Since 2009, it has pushed China and other powerful countries to let it participate in the aviation agency as a way of keeping up on air safety and security issues.

“This was not a very easy relaxation of Beijing’s blockade,” says Alexander Huang, a professor of strategic studies at Tamkang University in Taiwan. “This is long awaited goodwill from China. We pushed very hard both through bilateral channels and third parties.”

The nod from Mr. Hu followed nearly five years of talks on trade and investment that have built an unprecedented trust between China and Taiwan. China had threatened to use force against the island just 100 miles away as recently as 2005 and there was virtually no diplomacy until Taiwan President Ma Ying-jeou took office in 2008.

That year Mr. Ma shelved political issues to negotiate deals with China on trade and transit, a way to shore up his island’s economy. China embraced the move as a possible step toward reunification.

China may have approved the civil aviation agency’s move in order to boost the image of Taiwan’s president, who faces approval ratings of less than 20 percent in part because of perceived weakness on foreign policy, political analysts in Taipei say. Ma’s Nationalist Party is seen as friendlier toward Beijing than the chief opposition, which angered China before 2008 with campaigns to return Taiwan to the a full United Nations member.

China also allowed Taiwan to observe the World Health Assembly in 2009, its only other role in a UN-level organization since the 1970s.

Taiwan will attend the UN aviation agency’s assembly under the name Chinese Taipei, implying a relation to China and will not be allowed to vote.

But Tuesday’s guest pass for the aviation agency, or ICAO, just gets Taiwan off the ground in its goal of greater UN participation, the transport ministry in Taipei says.

“In the future, Taiwan will continue to strive to participate in related ICAO meetings, mechanisms, and activities, so as to advance its relations with the regional and global civil aviation communities,” the ministry said in a Sept. 14 statement. “Taiwan’s attendance at the assembly marks an important step forward in its bid for meaningful participation in ICAO.”