GREENSBORO, N.C. — Ex-presidential candidate John Edwards, who is on trial for allegedly using campaign contributions to hide an affair, initially targeted a longtime friend and a successful musician for money to support his mistress, a former aide said.

In the spring of 2007, Edwards asked his aide, Andrew Young, to approach his friend and ex-law partner David Kirby for money to support Rielle Hunter, the woman with whom he was involved in an affair, Young told a federal jury Tuesday in Greensboro, North Carolina. Edwards told him to say the money was a loan for a house Young and his wife were building in Chapel Hill, Young said.

Edwards “and Mr. Kirby had a decades-long close friendship and he was loyal,” Young said.

Young’s testimony comes on the second day of a trial over allegations Edwards illegally used almost $1 million in contributions from two wealthy donors to conceal his affair with Hunter, an unemployed filmmaker he later hired as a campaign videographer, during the 2008 presidential campaign. Edwards, who fathered a child with Hunter, faces a maximum five-year prison term for each of the six counts against him.

Story continues below advertisement.

Young testified he told Kirby the truth during that meeting in 2007 that the money was for Hunter, who began a relationship with Edwards in February 2006. Kirby said no.

Edwards spoke to Kirby after the initial denial and told Young to return to him again, Young testified. During the second meeting, Kirby asked Young to sign an IOU before he would give him $25,000. Young told prosecutors during questioning today that he declined the offer.

“I wasn’t going to be responsible for paying Mr. Kirby back for something that was for Mr. Edwards,” Young said, noting that the amount was inadequate. “This was going to be a long-term problem and Ms. Hunter had good taste.”

Young then suggested approaching trial attorney Fred Baron, who he described as a longtime political supporter with deep pockets. Edwards rejected the idea because Baron was a “gossip,” Young said. Baron later spent more than $200,000 on personal jets and first-class accommodations for Hunter and the Youngs while helping to hide the affair from the public, according to prosecutors. Baron died in October 2008.

Edwards then suggested a musician who was independently wealthy and a good supporter, Young testified. It was Edwards’s idea to have the musician, who wasn’t identified today in court, put Young on the payroll and use that money for Hunter, Young said. The idea didn’t pan out, Young said.

It was then that Young remembered a note he had gotten from Rachel “Bunny” Mellon, a multimillionaire heiress who was eager to see Edwards in the White House. The letter, sent by Mellon after media reports on the price of Edwards’ haircuts, suggested sending to her “all bills” necessary and important for the campaign. Edwards told Young to follow up and find a way to “work around” Mellon’s attorney, Alex Forger, Young said.

“He said he had spoken to her and she was good to go,” Young testified of his conversation with Edwards. “He said to say that this was for a non-campaign expense. Something that would benefit him.”

Young said Mellon said she would give Edwards $1.2 million over time and suggested writing the checks from her personal account to an interior decorator who would then endorse them and forward to the Youngs. The plan called for Young’s wife, Cheri, to then endorse the checks in her maiden name and deposit them into the couple’s bank account, Young told jurors.

“It was crazy,” Young said. “We were all scared to death. He was a viable presidential candidate. This was a truckload of money, much more than has ever flowed through our accounts, and getting my wife involved.”

Young testified he asked Edwards about five times about the legality of the plan. Edwards assured him that he had spoken to several campaign-finance experts and that it was “absolutely legal,” Young said.

“We felt extremely uneasy about it,” Young said. “It felt and smelled wrong but we believe he knew more about the law than we did and we went along with it.”

Young, who published a book in 2010 detailing the affair, is testifying for prosecutors under an agreement that granted some immunity. Lawyers for Edwards argued at the start of the trial yesterday that Young is an opportunist who saw Edwards as his “ticket to the top” and approached Mellon on his own. Some of the more than $725,000 Mellon ultimately gave Edwards went to build the Youngs’ $1.5 million home in Chapel Hill, Allison Van Laningham, an attorney for Edwards, told jurors during her opening statement.