Prime Minister Stephen Harper鈥檚 former special counsel and legal adviser worked on the legal deal between Nigel Wright and Sen. Mike Duffy鈥檚 lawyer that called for Wright to help Duffy pay off $90,000 in invalid expense claims, 麻豆传媒 has learned.

Sources told CTV鈥檚 Ottawa Bureau Chief Robert Fife that back in February, Benjamin Perrin helped draft the letter of understanding that called for Duffy to publicly declare that he would repay the money. In return, sources say, Wright would give a personal cheque to Duffy to cover the $90,000. Sources say the agreement also stipulated that a Senate investigation into expense claims would go easy on Duffy.

The Prime Minister鈥檚 Office insists that neither Perrin nor Wright told Harper about the payout to Duffy or about any aspects of the secret arrangement.

The PMO also declined to release the letter of agreement, saying it is now in the hands of Ethics Commissioner Mary Dawson, who is investigating Wright鈥檚 $90,000 cheque to Duffy.

Dawson鈥檚 investigation could take a year or more.

Attempts to reach Perrin via email and telephone last week and on Monday were unsuccessful.

Perrin left the Prime Minister鈥檚 Office in April and has returned to his position as an associate professor at the University of British Columbia鈥檚 Faculty of Law.

According to Perrin鈥檚 online biography on the UBC website, while in Ottawa he served as a lead policy adviser on matters related to the Department of Justice, Public Safety Canada and Citizenship and Immigration Canada. He is a renowned expert on human trafficking and child exploitation.

On Sunday, Wright resigned as Harper鈥檚 chief of staff, saying that he did not advise the prime minister of the 鈥渕eans by which Sen. Duffy鈥檚 expenses were repaid, either before or after the fact.鈥

Harper said in a statement Sunday that he accepted Wright鈥檚 resignation with 鈥済reat regret鈥 and thanked his top aide for his contributions to the Tory government.

鈥淚 accept that Nigel believed he was acting in the public interest, but I understand the decision he has taken to resign.鈥

Duffy鈥檚 expenses had been the subject of an internal audit, along with those of Senators Patrick Brazeau and Mac Harb.

Under the Senate鈥檚 housing rule allowance, senators can be compensated for living expenses if they live more than 100 kilometres from Ottawa, requiring them to maintain a secondary residence.

However, evidence outlined in an independent audit showed that Duffy, Brazeau and Harb each spent more time in the capital than at the homes declared to be their primary residences, rendering their claims ineligible.

Earlier this month, a Senate committee ordered Brazeau to repay about $48,000, and Harb $51,000.

Brazeau insists that he didn鈥檛 break rules by claiming the housing allowance, and he is determining if the order to repay the money can be overturned. Harb has retained a lawyer and will attempt to 鈥渜uash鈥 the audit鈥檚 findings.

Fife reported Monday night that, 鈥淎 lot of Conservative MPs would like to see the Conservatives use their majority in the Senate to strip the pay and benefits of Duffy, Pamela Wallin, Patrick Brazeau and Mac Harb. It鈥檚 a question that will be put to the prime minister tomorrow by Conservative MPs, I suspect, and certainly by the media.鈥

On Tuesday morning, Harper will hold a meeting with Conservative MPs and senators, many overwhelmed by complaints from constituents about the issues raised in recent weeks.

鈥淐onservative MPs are going to be seeking answers. They鈥檙e getting an earful from their constituents about this, but I鈥檓 afraid they鈥檙e not going to be very happy with the answer,鈥 Fife said. 鈥淭he prime minister鈥檚 version is that he was in the dark and that he didn鈥檛 know and he鈥檚 going to tell his caucus if anybody else is caught fleecing taxpayers, they are going to get the boot.鈥