A Bucks County businessman at the center of the bribery case against Philadelphia District Attorney Seth Williams testified Thursday that he showered the city's top prosecutor with pricey gifts, all-expenses-paid travel, and dinner at exclusive restaurants because he "wanted to get close to the DA."

And though the relationship outlined by Mohammad N. Ali during four hours on the witness stand sounded at times like a genuine friendship built over years of double dates and a 2012 couples' trip to a swanky Dominican resort, when asked directly by prosecutors what he got out of cozying up to the district attorney, Ali answered in purely transactional terms.

"It's good to know someone in power," he told jurors on the third day of Williams' federal bribery and corruption trial. "If you ever need anything, it's good to have someone make a phone call."

As Ali told it, he sought Williams' aid again and again for everything from bypassing secondary airport screening to throwing some muscle behind the citizenship application for Ali's wife, who was from Belarus. And when a friend found himself on the wrong side of a drug charge in 2011, Ali said, Williams offered to intervene.

But the friendship Ali described Thursday appeared to be entirely one-sided. He paid for everything, and Williams rarely came through on his promises – a point the district attorney's lawyers are sure to stress  Friday when they get a chance to cross-examine the businessman.

In his opening statement to jurors this week, defense lawyer Thomas Burke argued that despite whatever help the district attorney might have promised Ali, Williams never took any action to help.

What's more, Burke argued, Ali cannot be trusted, as his testimony came as part of a plea agreement with prosecutors stemming from his own admission in court last month to bribery and tax evasion charges.

Still, the businessman's claims are central to prosecutors' case that Williams extorted bribes from wealthy benefactors to fund a jet-setting, luxury lifestyle he could not afford on his own.

Ali, 40, of Feasterville, emerged as a key figure in the case hours after Williams was charged this year with 29 counts, including bribery, extortion, and honest services fraud.

But until he strode into court Thursday, dressed in a slim-cut black suit with matching tie, much about the man – and his relationship with Williams – had remained an enigma.

A Bentley-driving Jordan native with a taste for the same high life that prosecutors have accused Williams of chasing, Ali said he made millions in the early 2010s peddling prepaid phone cards and energy drinks.

When the phone card market tanked with the rise of internet-based international calling services, he said, he downgraded his car to a more economical Lamborghini and bought a dental practice in Maryland.

"Did you know anything about dentistry?" Assistant U.S. Attorney Vineet Gauri asked.

"Not at all," Ali replied.

As Ali recounted his professional past, Williams sat at the defense table, fingers laced in his lap, glowering in the direction of his onetime friend. But even he cracked a smile when the man's testimony turned to the signs of their budding bromance.

Prosecutors showed photos of Ali and Williams cavorting beachside in T-shirts and floral-print swim trunks during a 2012 trip to the Caribbean, and played videos of the two parasailing together over crystal-blue waters.

And they projected for jurors years of text messages laced with smiley-faced emoticons and mutual claims of "I miss you."

"He always said I looked like Drake," Ali testified, eliciting chuckles from the jury box from the reference to the rapper.

When federal agents raided Ali's business in 2014, they found a framed photo of Williams prominent on the desk.

Asked Thursday why that photo was one of the only ones he had in his office, Ali explained: "Simple status. I was friends with the district attorney."

Federal agents discovered the relationship between the men almost by accident.

Ali first came to the attention of authorities in 2011 when he became the target of a long-running money-laundering investigation.

Testifying earlier Thursday, Homeland Security investigations agent Thomas Acerno said he began tracking nearly $98 million that Ali's company, United Telecard Alliance, deposited and quickly drained from its bank accounts over six years.

As the probe intensified, he said, he began having Ali stopped for additional screening each time he returned to Philadelphia International Airport from frequent trips, including to Colombia, the United Arab Emirates, Malaysia, and China.

When Ali managed to evade those secondary checks in February 2012, thanks to a police escort that was waiting at the terminal for his arrival, Acerno told jurors, he grew suspicious.

"That was very abnormal for an investigation," he said. "It had me thinking Mr. Ali had some sort of connection."

Agents later confiscated Ali's phone and discovered the trove of text-message conversations between him and Williams – exchanges in which he frequently complained to the district attorney about what he described as his "airport problem."

Prosecutors say Williams requested that Philadelphia police officials and U.S. Rep. Robert Brady's office look into the matter on Ali's behalf.

Williams has maintained that he did so only because he believed his friend had become a victim of racial profiling.

Throughout his testimony Thursday, Ali appeared almost nervous, hesitating several times as he cataloged the gifts he gave the man he referred to as "Mr. Seth" – a list that included an $840 Burberry watch, a $200 Louis Vuitton tie, a $3,000 sofa, and a free trip for Williams and his girlfriend to a luxury, $1,000-a-night Dominican resort complete with private beach access and a personalized concierge service.

"To me, gifts are a way to get closer to people," Ali said. "It's another way of winning somebody's attention."

But with one question Thursday, Gauri sought to indicate the hollowness of that bond.

"Did Seth Williams ever buy you a gift?" the prosecutor asked.

Ali quietly responded: "No."

Staff writer Joseph A. Slobodzian contributed to this article.