WASHINGTON (Reuters) - U.S. President Donald Trump moved to reset U.S. relations with Egyptian President Abdel Fattah al-Sisi on Monday after the prior Obama administration’s strained ties, giving him firm backing and vowing to work together to fight Islamist militants.

A joint statement said the two leaders agreed on the importance of advancing peace throughout the Middle East, including in Libya, Syria, and Yemen, and expressed interest in supporting Israel and the Palestinians in moving toward peace.

“I just want to let everybody know in case there was any doubt that we are very much behind President Sisi. He’s done a fantastic job in a very difficult situation. We are very much behind Egypt and the people of Egypt,” Trump said in an Oval Office meeting with the Egyptian leader.

The trip was Sisi’s first official U.S. visit since being elected president in 2014. Trump’s predecessor, Barack Obama, never extended an invitation.

Obama froze aid to Egypt for two years after Sisi, then a general, overthrew President Mohamed Mursi in mid-2013 after mass protests against Mursi’s rule. Mursi, a Muslim Brotherhood member, had been elected the previous year.

The one-on-one meeting between Trump and Sisi, followed by a separate gathering with top aides, showed how intent the new U.S. president is on rebooting the bilateral relationship and building on the strong connection the two presidents established when they first met in New York last September.

“I just want to say to you, Mr President, that you have a great friend and ally in the United States, and in me,” Trump said.

Slideshow ( 9 images )

Sisi said he appreciated that Trump has been “standing very strong ... to counter this evil ideology.”

The joint statement said Trump and Sisi agreed that Islamist militants could not be defeated solely by military force. It said the leaders “agreed on the necessity of recognizing the peaceful nature of Islam and Muslims around the world.”

While Trump noted the United States and Egypt “have a few things” they do not agree on, he made no public airing of U.S. concerns about human rights in Egypt.

Rights groups have called for the release of Aya Hijazi, an Egyptian-American who works with street children and was arrested in May 2014 on human trafficking charges.

Hijazi has been held in custody for 33 months in violation of Egyptian law, which states that the maximum period for pre-trial detention is 24 months.

A senior administration official said the subject of Hijazi did not come up in the meeting with Trump, Sisi and their advisers, but said the detention was an issue of concern and a case that was being watched closely by the Trump administration.

At the United Nations in New York, U.S. ambassador to the United Nations, Nikki Haley, said the Trump administration was not backing away from human rights “because they fully support me speaking about human rights in the Security Council.”

Human rights groups have estimated that Sisi’s government has detained at least 40,000 political prisoners.

Egypt has long been one of Washington’s closest allies in the Middle East, receiving $1.3 billion in U.S. military aid annually. It is fighting an Islamist insurgency in Sinai in which hundreds of Egyptian soldiers and police have been killed.