– President Donald Trump is moving toward major shuffles of his Cabinet and his West Wing staff, as members of the Trump family are working to leave a mark on personnel decisions after a bruising midterm election cycle, several people familiar with the discussions said Tuesday.

Trump is almost certain to fire Kirstjen Nielsen, the secretary of homeland security who has long been a target of the president's displeasure, three people close to the president said. Trump talked about dismissing Nielsen ahead of his trip to Paris.

But inside the White House, removing Nielsen is also seen as a way for Trump to push out White House Chief of Staff John F. Kelly without directly firing him. Nick Ayers, the chief of staff to Vice President Mike Pence, has long been seen as a prospective replacement for Kelly if he leaves.

Another administration official, Mira Ricardel, a foreign policy hard-liner who had been serving as a ­deputy to National Security Adviser John Bolton was expected to be dismissed, after First Lady Melania Trump complained about her to Kelly, according to a person familiar with the situation.

Ricardel, who previously worked at the Pentagon and on Capitol Hill, had disparaged two members of Melania Trump's staff during the first lady's trip to Africa last month, the person said. Ricardel also is said to have tangled with Defense Secretary Jim Mattis on issues of policy and Pentagon­ ­personnel.

In a highly unusual statement about West Wing personnel matters, Stephanie Grisham, a spokeswoman for the first lady, addressed Ricardel's status. "It is the position of the Office of the First Lady that she no longer deserves the honor of serving in this White House," Grisham said.

As for the chief-of-staff role, Ayers is favored by the president's son-in-law, Jared Kushner, and daughter Ivanka Trump, both of whom serve as West Wing advisers. President Trump's oldest son, Donald Trump Jr., has told friends he sees Ayers as "competent," a stamp the Trump family has not always affixed to people working for their father.

Ayers did not travel as originally planned with Pence on his official trip to Asia this week, two White House officials said. And another prospective chief-of-staff, Mick Mulvaney, who already leads two agencies and who had been seen as campaigning for the West Wing job, has told aides he is no longer interested.

Several people working in the White House who are not among the Trump family members or their allies have expressed concern to the president about putting Ayers in that role and have warned that some staff members might quit because of it.

Trump hates interpersonal confrontation, and he often lets aides he does not like remain in their positions for uncomfortably long times, meaning changes could still be weeks away, the people close to the president cautioned. And Ayers' name has been mentioned as a Kelly successor before, only to disappear as Kelly has remained in his post.

But Nielsen has been a target of Trump's ire for many months, primarily over his administration's "zero tolerance" immigration policy and his belief that she was not implementing it effectively.

Trump and Kelly arrived at a plan earlier this year for Kelly to remain in his job through the 2020 election, but the president has privately told allies that he would not bet on his chief-of-staff staying that long.

Kelly has often defended Nielsen to the president and protected her from other Cabinet members when she was under attack from them.

Among some of Trump's allies, his views and treatment of Nielsen have been characterized as unfair. The president has derided her previous service in the George W. Bush administration and questioned her loyalty. He also helped ensure that she was the face of the deeply controversial border separation policy involving taking children from their parents.

Inside the Department of Homeland Security, some employees said they had believed for months that Nielsen was on her way out.

The employees say Nielsen has struggled to explain to the White House the complexities of border security.