The percentage of Philadelphia residents who were born outside the United States doubled between 1990 and 2017, to 13.8 percent, but the top country of origin might be a surprise.

China is far and away the primary sending country, with 22,140 city residents, who make up about 11 percent of the foreign-born population, according to a Pew Charitable Trusts analysis of census data. Next is the Dominican Republic with 13,792, followed by Jamaica, 13,500; India, 11,382; and Vietnam, 10,132.

About 230,000 Philadelphians are foreign-born. More than a quarter of residents are immigrants or have a foreign-born parent, Pew reported, and 23 percent speak a foreign language at home.

“Philadelphia has seen a big increase in the number of immigrants living, working and raising families in the city over the past several decades,” wrote Pew, which looked at figures from 1970 to 2017. “These changes have had a profound impact on the city and are largely responsible for the growth it has experienced since 2006.”

The city population grew slightly to 1.58 million in 2018, marking a 12th straight year of growth, according to census estimates released last month. That streak of increasing population counters more than 30 years of mostly unbroken losses that began in the 1970s.

The increase in Philadelphia’s foreign-born population comes at a time when many Americans have hardened their attitudes, with a majority wanting immigration to this country to decrease or stay at the same level. Only 24 percent want more migrants to come here.

Also according to the Pew analysis: 67 percent of Philadelphians were born in Pennsylvania, 16 percent were born in other states, and 3 percent were born in Puerto Rico or a U.S. territory.