In public, District Attorney Seth Williams used to argue that his longtime nemesis, former state Attorney General Kathleen Kane, was somehow behind the legal woes that cast a shadow over his career.

It was a red herring. Behind closed doors, Williams told confidantes that he believed his ties to a little-known businessman from Bucks County named Mohammad N. Ali were the real reason the FBI and IRS began investigating his finances in 2015, culminating with his indictment Tuesday on a host of corruption charges.

Federal investigators portray the relationship between Ali and Williams as one that came uncomfortably close to resembling a quid pro quo: Ali showered the D.A. with an all-expenses-paid vacation to Punta Cuna and $9,000 in cash, while Williams offered to help Ali with problems he had with security screeners at Philadelphia International Airport and look into a criminal case that involved an associate of Ali's.

Anyone who read through the 23-count indictment was left wondering: Just who is Ali, a man who thought nothing of buying the city's top prosecutor a $3,200 couch, and how did he come into Williams' life?

Some answers have begun to emerge.

Ali, 40, is a native of Jordan who used to own a prepaid-phone-card business in Feasterville called United Telecard Alliance. He first met Williams in 2010; that year, he donated $2,500 to the Friends of Seth Williams, the D.A.'s political action committee, according to campaign finance records.

Ali donated a total of $1,500 to the same PAC during the next three years, a figure that pales next to the enormous sums he shelled out on gifts and trips for Williams, who has long complained about his personal financial woes despite earning $175,572 as D.A.

There are no records of Ali donating money to other Philadelphia politicians, but he started to pop up on some pols' radar as his relationship with Williams grew.

"It's a name I've heard before," State Sen. Anthony H. Williams told the Inquirer and Daily News on Wednesday. "I know somebody talked to me about him a few years ago, but I don't think it was Seth."

On at least one occasion, Ali was seen walking around the District Attorney's Office in an area where the D.A. and other top brass were situated, according to a former veteran city prosecutor, who spoke on the condition of anonymity.

"I never met the guy, but I remember Seth talking about him," said another former city prosecutor, who also spoke to the Inquirer and Daily News anonymously. "Seth said that [Ali] is how the feds got onto him, because he gave him that couch."

Williams also referenced trying to intervene on Ali's behalf over issues he was having at Philadelphia International Airport, that same prosecutor said.

According to the indictment, Williams made multiple offers to help Ali avoid secondary screenings when he returned from international travel, going so far as to meet with both Ali and a Philadelphia police official who was detailed to the airport on March 15, 2013. That same day, Ali gave Williams a $7,000 check.

Federal officials stressed earlier this week that the police official, whose name they didn't release, did nothing wrong. In a text message to Ali about a year later, Williams offered to "send a letter" to Homeland Security officials on Ali's behalf, the indictment shows. "I want there to be a letter in your file from the D.A. of Philadelphia," he wrote.

So what was the airport problem all about?

"Mohammad Ali is an American citizen of Jordanian descent. His mother still lives in Jordan, and he has a lot of extended family there," said Mark Cedrone, Ali's attorney."Every time he would travel internationally, he would be held for extended secondary screenings that lasted for hours. That's really all that was."

Cedrone declined to answer any other questions about Ali and Williams.

In another series of text messages, Ali asked Williams to "help with a case for a friend of my friends" who was being prosecuted by the D.A.'s Office and facing a sentence of 1 and a half to 3 years, a term which would have placed him in a state prison. "It seems like he has the possibility of having it thrown out or continued ... if it gets continued I will then ask for the file and see what can be done to make it a county sentence," Williams responded to requests from Ali to get the sentenced reduced.

Several former city prosecutors said it was not uncommon for Williams to ask about the status of individual cases for reasons that were often unclear. "Seth is a friend of mine. I love him," said Williams, the state senator. "What I read made me emotionally concerned about my friend."

Ali, who is married with three children, did not respond to a separate request for comment. A woman who answered the door at his picturesque 3,450-square-foot home on a cul-de-sac in Feasterville said she only spoke Russian. The property was recently put up for sale, with a listing price of $599,500.

His former prepaid-phone-card business sits empty near a strip of weathered shops on Bustleton Pike. A former employee of the store, Vineer Guliani, filed a federal lawsuit against Ali in 2012 over an unexplained salary cut. The case was settled a year later; as part of the settlement agreement, Guliani is not allowed to discuss the matter, said his attorney, Scott Fegley.

Ali, who went to the University of Jordan, according to his LinkedIn account, now runs a company called What's Up Beverages LLC, which appears to sell energy drinks.

Staff writer Barbara Laker contributed to this report.