WASHINGTON — President Trump has nominated a staunch anti-immigration activist to head the State Department agency that oversees refugee and immigration issues.

Ronald W. Mortensen, a former U.S. Foreign Service officer and longtime fellow at the Center for Immigration Studies, which advocates against legal and illegal immigration, is Trump’s choice to be assistant secretary of State for the bureau of population, refugees and migration. The White House announced the nomination late Thursday.

As word spread on Friday, Democrats and immigration advocates quickly objected. But Mortensen, who must be confirmed by the Republican-controlled Senate, could face trouble among Republicans as well: His long trail of controversial writings and statements includes attacks not only against immigrants but against some Republican senators, including Sens. Marco Rubio of Florida and John McCain of Arizona.

Mortensen, originally from Utah, in 2015 called Rubio “exceptionally gullible or just plain dishonest” on immigration issues. In 2014, he said McCain had made the U.S. vulnerable to infiltration by the Islamic State terrorist group through his “dogged support for illegal aliens and open borders.”

In February 2017, just after Trump took office, Mortensen praised his efforts to step up deportations of immigrants in the country illegally and to ban some legal arrivals. He wrote in a blog post that Trump had succeeded in destroying “the myth of the noble, law-abiding illegal alien.”

Until Trump was elected, Mortensen wrote, “the career politicians that he replaced had consistently put illegal aliens first and deliberately ignored the terrible harm done to the American men, women and children.”

The Washington-based Center for Immigration Studies where he’s worked has been listed by the Southern Poverty Law Center as a hate group, a designation it rejects.

The bureau that Mortensen would run is supposed to have a different aim. Its purpose is to “provide protection, ease suffering, and resolve the plight of persecuted and uprooted people around the world,” according to its mission statement.

One of Mortensen’s favorite targets lately, according to his blog posts, has been the Deferred Action for Childhood Arrivals program, an Obama-era permit system that temporarily protected from deportation roughly 800,000 immigrants who came to the country illegally as children. Trump has ordered an end to the program, though courts have blocked him for now.

In one post on March 10, 2017, Mortensen argued that DACA gives amnesty to “criminal illegal aliens” and “most” DACA recipients have committed “multiple felonies to get jobs.”

The number of DACA beneficiaries, known as “Dreamers,” who have been convicted of crimes is very low; all have been vetted to get their two-year permits to live in the United States, work, attend college and serve in the military.

The crime rate among immigrants in general is lower than for the overall U.S. population, government data show.

Rep. Joseph Crowley of New York, chairman of the House Democratic Caucus, said Mortensen’s “racist, vile and disparaging comments against immigrants” disqualified him for the post.

Jennifer Quigley, a refugee advocate at Human Rights First, called Mort- ensen’s statements extremist. “At a time when the world is facing the worst displacement crisis since World World II, it is astounding President Trump would nominate an individual with a hostile attitude toward immigrants,” Quigley said.

“Mortensen’s nomination is like choosing the fox to guard the hen house,” she added.

Efforts to reach Mortensen on Friday were unsuccessful. In announcing the nomination, the White House praised Mortensen’s 15 years of work in disaster aid, saying he “worked on humanitarian responses that saved lives and alleviated the suffering of millions of people” in the Middle East, Africa and Haiti.