– Three months before the 2016 election, a small group gathered at Trump Tower to meet with Donald Trump Jr., the president’s eldest son. One was an Israeli specialist in social media manipulation. Another was an emissary for two wealthy Arab princes. The third was a GOP donor with a controversial past in the ­Middle East as a private security contractor.

The meeting was convened primarily to offer help to the Trump team, and it forged relationships between the men and Trump insiders that would develop over the coming months — past the election and well into President Donald Trump’s first year in office, according to several people with knowledge of their encounters.

Erik Prince, the private security contractor and the former head of Blackwater, arranged the meeting, which took place on Aug. 3, 2016. The emissary, George Nader, told Trump Jr. that the crown princes who led Saudi Arabia and the United Arab Emirates were eager to help his father win election as president. The social media specialist, Joel Zamel, extolled his company’s ability to give an edge to a political campaign; by that time, the firm had drawn up a multimillion-dollar proposal for a social media manipulation effort to help elect Trump.

The company, which employed several Israeli former intelligence officers, specialized in collecting information and shaping opinion through social media.

It is unclear whether such a proposal was executed, and the details of who commissioned it remain in dispute. But Trump Jr. responded approvingly, according to a person with knowledge of the meeting, and after those initial offers of help, Nader was quickly embraced as a close ally by Trump campaign advisers — meeting frequently with Jared ­Kushner, Trump’s son-in-law, and Michael Flynn, who became the president’s first national security adviser. At the time, Nader was also promoting a secret plan to use private contractors to destabilize Iran, the regional nemesis of Saudi Arabia and the UAE.

After Trump was elected, Nader paid Zamel a large sum of money, described by one associate as up to $2 million. There are conflicting accounts of the reason for the payment, but among other things, a company linked to Zamel provided Nader with an elaborate presentation about the significance of social media campaigning to Trump’s victory.

The meetings, which have not been reported previously, are the first indication that countries other than Russia may have offered assistance to the Trump campaign in the months before the election. The interactions are a focus of the investigation by Special Counsel Robert Mueller, who was originally tasked with examining possible Trump campaign coordination with Russia in the election.

Nader is cooperating with the inquiry, and investigators have questioned numerous witnesses in Washington, New York, Atlanta, Tel Aviv and elsewhere about what foreign help may have been pledged or accepted, and about whether any such assistance was coordinated with Russia, according to witnesses and others with knowledge of the interviews.

The interviews are further evidence that the special counsel’s investigation remains in an intense phase even as Trump’s lawyers are publicly calling for Mueller to end it.

It is illegal for foreign governments or individuals to be involved in U.S. elections, and it is unclear what — if any — direct assistance Saudi Arabia and the UAE may have provided. But two people familiar with the meetings said Trump campaign officials did not appear bothered by the idea of cooperation with foreigners.

A lawyer for Trump Jr., Alan Futerfas, said in a statement that “before the 2016 election, Donald Trump Jr. recalls a meeting with Erik Prince, George Nader and another individual who may be Joel Zamel. They pitched Mr. Trump Jr. on a social media platform or marketing strategy. He was not interested and that was the end of it.”

The August 2016 meeting has echoes of another Trump Tower meeting two months earlier, also under scrutiny by Mueller, when Trump Jr. and other top campaign aides met with a Russian lawyer after being promised damaging information about Hillary Clinton. No evidence has emerged suggesting that the August meeting was set up with a similar premise.

The revelations come in the midst of new scrutiny about ties between Trump’s advisers and at least three wealthy Persian Gulf states. Besides his interest in Saudi Arabia and the UAE, Mueller has also been asking witnesses about ­meetings between White House advisers and representatives of Qatar, Saudi Arabia’s bitter rival.

A lawyer for Zamel denied that his client had carried out any campaign on Trump’s behalf. “Neither Joel Zamel, nor any of his related entities, had any involvement whatsoever in the U.S. election campaign,” said the lawyer, Marc Mukasey.

“The DOJ clarified from Day 1 that Joel and his companies have never been a target of the investigation. My client provided full cooperation to the government to assist with their investigation,” he said.

Kathryn Ruemmler, a lawyer for Nader, said, “Mr. Nader has fully cooperated with the special counsel’s investigation and will continue to do so.” A senior official in Saudi Arabia said it had never employed Nader in any capacity or authorized him to speak for the crown prince.

Prince, through a spokesman, declined to comment.

Crown Prince Mohammed bin Zayed al-Nahyan of Abu Dhabi, the de facto ruler of the United Arab Emirates, and Crown Prince Mohammed bin Salman of Saudi Arabia, the king’s main adviser, had long opposed many of the Obama administration’s policies toward the Middle East.

News outlets linked to Saudi Arabia and the UAE fiercely criticized Clinton, Trump’s Democratic opponent, when she was secretary of state, and diplomats familiar with their thinking say both crown princes hoped for a president who would take a stronger hand in the region against both Iran and groups like the Muslim Brotherhood.

Nader had worked for years as a close adviser to Crown Prince Mohammed of Abu Dhabi, and Zamel had worked for the UAE royal court as a consultant as well. When Trump locked up the GOP nomination in early 2016, Nader began making inquiries on behalf of the Emirati prince about possible ways to directly support Trump, according to three people with whom Nader discussed his efforts.