(CNN) In the weeks before President Donald Trump visited Saudi Arabia on his first foreign trip, the Saudi government hired three US lobbying firms to do its bidding in Washington, including an obscure group made up of former Trump advisers that will receive $5.4 million for one year's work, federal records show.

The Saudis have now added six U.S. lobbying firms since Trump's election in a bid to improve frayed relations with the United States -- and to capitalize on a president who skewered them as a candidate but is now seen as an ally.

The Saudi Interior Ministry hired Sonoran Policy Group of Arizona in May -- the day after Trump announced he would visit Saudi Arabia -- as a "government affairs and commercial sector adviser" for $5.4 million, according to records the firm filed with the Justice Department. That's a startling sum even in the lucrative business of lobbying for foreign governments.

Sonoran's lobbying work over the years has focused on small domestic clients including California technology companies, federal records show. It had no experience representing foreign governments until December.

But it does have extensive ties to Trump.

Sonoran hired in December as its president Stuart Jolly, the political director of a pro-Trump political-action committee that raised $28 million and the Trump campaign's former national field director.

"Stuart is really one of the geniuses and brains behind this great human experiment that Donald Trump did," Sonoran owner Robert Stryk said in an interview in January. He marveled at Jolly's access to Trump after Sonoran secured its first foreign client, the New Zealand government.

"I text Stuart Jolly and say we need to get Mr. Trump to talk to the Prime Minister of New Zealand. Within 30 minutes this man got us the private cellphone of Mr. Trump," Stryk told the New Zealand Herald.

A White House official said Trump had not spoken to Jolly since he left the Trump campaign, in April, and that Jolly might have had Trump's old cellphone number, which has been inactive since January.

Stryk himself is a longtime Republican operative who represented former Trump campaign manager Corey Lewandowski in 2016, brokering a $1.2-million book deal that later fell through.

Another Sonoran lobbyist, Jacob Daniels, was chief of staff for the Trump campaign in Michigan, where Trump's surprise win helped him capture the White House.

Neither Sonoran Policy Group nor the Saudi embassy returned phone calls and emails. Jolly left Sonoran this month to start his own firm, according to Politico

But with other former Trump aides still there, the firm remains well positioned to take advantage of its connections.

"If it weren't for the revolving-door connections here, the Saudi government would not be pouring $5.4 million into this firm," said Craig Holman, a lobbying analyst at Public Citizen. "Even the best lobbyist isn't worth that price."

Lobbyists: Don't Talk to the Embassy

The Saudi government has long relied on a fleet of Washington lobbyists, paying millions of dollars a year and maintaining more lobbying contracts, at 28, than any country in the world except Japan, which has 47, according to a CNN review of federal lobbying records.

"When the Saudi lobbyists knock on my door and try to get me to see things the Saudi way, they say, 'Don't talk to the embassy, they don't know what's going on. Talk to us,'" said David Andrew Weinberg, a Saudi specialist at the Foundation for Defense of Democracies and former Congressional aide.

Saudi lobbyists have taken unprecedented steps in recent months to highlight the country's ties to the U.S. and its military efforts, which have drawn criticism for killing civilians in Yemen. Saudi-U.S. relations soured under President Barack Obama and bottomed out in September when Congress enacted a law that lets relatives of the 9/11 victims sue the Saudi government.

On four occasions since March, the Podesta Group, a prominent Democratic lobbying firm, sent pro-Saudi material to hundreds of Congressional staffers and Middle East analysts. The public-relations blitz included opinion pieces by senior Saudi officials, a 15-page transcript of an interview with the Saudi defense minister, and a biography of the new Saudi ambassador to the US, Prince Khalid bin Salman, lobbying records show.

The emails went out shortly after the Saudi Royal Court renewed a $1.7-million annual contract with the Podesta Group, which had never previously sent mass materials on behalf of its Saudi client, records show.

In a separate lobbying push days before Trump's overseas trip began, the lobbying firm Brownstein Hyatt Farber and Schreck distributed to US officials two 60-page reports explaining the Saudi bombing campaign in Yemen, where Saudi forces are leading a military effort to restore Yemen's ousted president.

One of Brownstein's newest lobbyists is Mimi Burke , who spent 24 years working in Saudi Arabia's embassy in Washington and registered on May 11 to lobby for the Saudi Foreign Ministry.

Jolted by Defeat

After years of strategic cooperation with the United States, the Saudis were jolted in September when Congress voted to allow families of 9/11 victims to sue Saudi Arabia and some of its financial institutions over possible connections to the 2001 terror attacks.

The Saudis quickly recognized "that they hadn't been serious enough about their approach to Washington," said Jon Alterman, senior vice president at the Center for Strategic and International Studies, a Washington think tank.

Saudi officials are encouraged by Trump's rapprochement, Alterman said. But they likely would have stepped up their lobbying efforts "whether it was the Trump administration or the Clinton administration, because there's a broad perception in Saudi Arabia that they have insufficient and narrow support in the United States," Alterman said.

The highlight of Trump's trip to Riyadh on May 20-22 was a $110-billion weapons sale to Saudi Arabia, a deal brokered by Jared Kushner, his son-in-law, who has now come under scrutiny in the FBI's probe of Russian meddling in the 2016 presidential election.

At the same time, Trump announced that Saudi Arabia would invest $20 billion in U.S. infrastructure projects, and that the two countries would undertake new initiatives to fight extremist messages and disrupt terrorism financing.

Senator Rand Paul, a Republican from Kentucky, plans to introduce a measure to block the arms sale in Congress, a Rand aide told CNN last week. Senator Chris Murphy, a Connecticut Democrat on the Senate foreign affairs committee, strongly opposes the sale, saying in a Huffington Post op-ed piece that Saudi Arabia has "the worst human rights record in the region."

Trump himself excoriated Saudi Arabia while he was running for president, saying during one debate that Saudis "push gays off buildings" and "kill women and treat women horribly."

But Trump has aimed his sharpest criticism at Iran -- Saudi Arabia's chief rival in the Middle East -- and has come to see Sunni Muslim Saudi Arabia as an ally against Shiite Iran.

Dueling Saudi Princes

On March 14, Trump had lunch at the White House with Saudi Deputy Crown Prince Mohammed bin Salman, the Saudi defense minister and possible heir apparent to the Saudi throne. The two leaders "reaffirmed their support for a strong, broad and enduring partnership," according to a White House statement at the time.

The next day, the Saudi Foreign Ministry renewed a $1.5-million annual contract with longtime lobbying firm Hogan Lovells, lobbying records show.

Trump's meeting with Salman helped drive the Interior Ministry to hire the Sonoran group, said Simon Henderson of the Washington Institute for Near East Policy. The interior minister, Crown Prince Mohammed bin Nayef, is the chief competitor with Salman to succeed Saudi King Salman bin Abdulaziz Al-Saud, who is 81 years old.

The jockeying for U.S. lobbyists signals that the dueling Saudi princes want to leverage their influence in Washington, Henderson said.

After seeing his rival prince meet with Trump, Nayef realized that "he needed to improve his game," Henderson said.

Correction: A previous version of this story stated Sonoran Policy Group hired Robin Townley as a lobbyist. Townley, who briefly served on Trump's National Security Council staff, is not a registered lobbyist. He said he has not worked for SPG; a representative of the firm declined to say whether Townley was an employee.