PORTLAND, Maine — Undaunted by a dangerous journey over thousands of miles, people fleeing economic hardship and human rights abuses in African countries are coming to the U.S.-Mexico border in unprecedented numbers, surprising Border Patrol agents more accustomed to Spanish-speaking migrants.

Officials in Texas and even Maine are scrambling to absorb the sharp increase in African migrants. They are coming to America after flying across the Atlantic Ocean to South America and then embarking on an often harrowing overland journey.

In one recent week, agents in the Border Patrol’s Del Rio sector stopped more than 500 African migrants found walking in separate groups along the arid land after splashing across the Rio Grande, children in tow.

That is more than double the total of 211 African migrants who were detained by the Border Patrol along the entire 2,000-mile (3,200-kilometer) U.S.-Mexico border in the 2018 fiscal year.

“We are continuing to see a rise in apprehensions of immigrants from countries not normally encountered in our area,” said Raul Ortiz, head of the U.S. Border Patrol’s Del Rio sector.

The immigrants in Texas were mostly from the Republic of the Congo, the Democratic Republic of the Congo and Angola. Cameroonians have also been traveling up through Mexico and into the U.S. in larger numbers and seeking asylum at ports of entry.

On recent Saturday in Tijuana, there were 90 Cameroonians lined up to get on a waiting list to request asylum that has swelled to about 7,500 names. Also on the waiting list are Ethiopians, Eritreans, Mauritanians, Sudanese and Congolese.

Cameroonians generally fly to Ecuador because no visa is required and take about four months to reach Tijuana. They walk for days in Panama through dense forest, where they are often robbed and held in government-run camps. They come from Cameroon’s English-speaking south with horrifying stories of rape, murder and torture since late 2016 by soldiers of the country’s French-speaking majority, which holds power.

A few days after the big groups of African immigrants were apprehended in Texas, federal officials dropped off dozens of them in San Antonio. Officials in the Texas city sent out a plea for French-speaking volunteers for translating work “and most importantly, making our guests feel welcome.”

Many were bused to Portland, Maine, about as far as one can get from the Mexican border and still be in the continental United States. Word has spread among migrants that the city of 67,000 is a welcoming place. Somali refugees were resettled in Portland in the 1990s.

A total of 170 asylum seekers arrived in recent days. Hundreds more are expected in an influx that City Manager Jon Jennings called unprecedented. With one shelter already full, a basketball venue called the Portland Exposition Building was converted into an emergency shelter.

Portland officials tweeted Thursday that rumors some of the migrants are carrying the Ebola virus “are patently false,” and said that as asylum seekers, they are in the United States legally.

On Thursday afternoon, families in the Expo chatted in French and Portuguese as children kicked a soccer ball near rows of cots. One of the men, 26-year-old Prince Pombo, described himself as a pro-democracy activist and said he had fled his native country, the Democratic Republic of Congo, because of political oppression. He went to neighboring Angola, then flew to Brazil. There, he met a local woman and they had a baby they named Heaven. Now 16-months old, she giggled as she played with her mother in the Expo. Pombo said his journey from Congo to America took three years.

More migrants are on the way. Mexico is on pace to triple the number of African immigrants it is processing this year, up from 2,100 in 2017.

Mbi Deric Ambi, from Cameroon, is among them. In a recent interview in the southern Mexican city of Tapachula, Ambi said he was waiting for a document from the Mexican authorities that would allow him to proceed north to the U.S. He traveled overland through South and Central America after flying to Ecuador, one of the few countries that do not require visas of Cameroonians.

Ambi is from the English-speaking part of Cameroon, which has been oppressed by the French-speaking majority. Human Rights Watch says 1,800 people have been killed and half a million have fled their homes in the Anglophone regions of Cameroon since late 2016. A United Nations official says 4.3 million people need humanitarian assistance.

“We don’t have jobs in the English part, the educational system is poor, they are looking at us as dogs,” Ambi said as a crowd of migrants jostled outside an immigration center in Tapachula, waiting for their names to be called to collect their travel document. Ambi has been waiting every morning for six weeks.

“We just have to be patient, because there is nothing we can do,” he said.

The explosion in immigration to the United States from sub-Saharan Africa coincides with a steep drop in the migration flow across the Mediterranean to Europe after European countries and two main embarkation points — Turkey and Libya — decided to crack down. From Jan. 1 to June 12, only 24,600 migrants arrived in Europe by sea, compared to 99,600 over the same period in 2017, according to the International Organization for Migration.

But IOM spokesman Joel Millman doubts the migrant path for Africans has swung over from Europe to America.

Pombo, who was a teacher in Congo, learned in an internet search and by asking around that Portland is good place for migrants. He said his next step is to start rebuilding a life for himself and his family.

“I’d like to feel safe. I’d like to build a decent life,” he said. “I need to start again.”

Selsky reported from Salem, Oregon. AP reporters Elliot Spagat in Tijuana, Maria Verza in Tapachula, Mexico, contributed to this report.