One of Prime Minister Justin Trudeau’s closest friends is benefiting from an exclusive agreement between his data analytics company and the Liberal Party of Canada.

Data Sciences Inc, run by Trudeau’s boyhood friend, Tom Pitfield, is providing the party with “digital engagement” and support services for its powerful voter-contact database, Liberalist.

Neither the party nor Pitfield would say how much the agreement is worth to the firm, which Pitfield set up after his friend was elected party leader.

Pitfield’s wife, Anna Gainey, is the president of the Liberal Party and also a close friend of Trudeau and his wife, Sophie Gregoire. The two families vacationed together at the Aga Khan’s resort in Bahamas over the Christmas holidays.

A spokesman for the Liberal Party of Canada says Gainey does not get involved in decisions involving her husband’s company.

“Our Party President has, and continues to, recuse herself from all decisions pertaining to Data Sciences,” Braeden Caley wrote in an email.

Two current Data Sciences Inc. employees are on the Liberal Party’s board of directors: Sébastien Fassier is the Liberal’s national vice president (French) and works as Data Sciences vice president of corporate services.

Mira Ahmad, sister of the prime minister’s press secretary Cameron Ahmad, sits on the board as president of the Young Liberals of Canada and works as Pitfield’s executive assistant at Data Sciences, according to a profile of her in Power & Influence magazine.

“The volunteers who serve on the National Board, and Party staff, take all appropriate steps to eliminate any conflict of interest,” Caley said.

Pitfield denied that his party connections were a factor in his work with the Liberals.

“Data Sciences is a world leader in our field and our services are in high demand by organizations here in Canada and abroad -- that is why the Liberal party hired us,” he wrote in an email.

Pitfield is also president of not-for-profit think tank Canada 2020, which regularly hosts policy conferences featuring cabinet ministers. The organization has received federal government funding in the past and raised concerns among Opposition parties about its close relationship with the Liberal leadership.

Canada 2020 threw a lavish party for Trudeau and his delegation in Washington, D.C. last spring, the night before he attended a state dinner at the White House.

CTV News has learned that the agreement with the party also sees Data Sciences Inc. providing technical support for Liberalist to provincial Liberal parties, as well as federal campaigns and riding associations.

Manitoba Liberal Party candidates were provided with access to the Liberalist software in the provincial election last year and told to contact Pitfield’s company for any support issues.

Caley wouldn’t say exactly what Data Sciences does for the party, other than provide “a variety of services pertaining to innovative digital engagement, helping the party reach as many Canadians as possible online and in communities from coast to coast to coast.”

Liberalist is a modified version of NGP VAN’s VoteBuilder software developed by Democrats in the U.S. and is widely credited with helping Barack Obama win the presidency in 2008.

The Democrats’ success with micro-targeting voters spawned numerous small analytics companies specializing in leveraging “Big Data” for U.S. political campaigns.

The Liberal party licensed NGP VAN’s software in 2011 and repackaged a modified version as Liberalist -- long before Pitfield began working as a chief digital strategist for Trudeau’s 2014 leadership campaign. Elections Canada records show Pitfield was paid $28,750 by the Trudeau campaign, including expenses. He also worked on the 2015 general election campaign.

The value of the Data Sciences agreement with the Liberals is unknown, as federal political parties are not obligated to reveal how they spend money they raise from donors, even though donations to them are heavily subsidized with federal tax credits.

Over the past year, the company has hired several staff members who had recently worked for the Liberals.

In November, the Liberal’s director of data analytics, Sean Wiltshire, was named vice president at Data Sciences, and in March 2016, the party’s manager of campaign technologies support, Nadya Wilkinson, was hired by Data Sciences as a director of operations.

The party has an obligation to its donors to ensure its money is spent properly, says Prof. Arthur Schafer, founding director of the Centre for Professional and Applied Ethics at the University of Manitoba.

“The story, as it's developing, truly smacks of cronyism,” Schafer told CTV.

“One could almost be part of a medieval court, where the king and his courtiers are scratching each others' backs. I don’t think it passes the smell test."

The agreement is not the first time the Liberals have done business with Pitfield. During the 2015 election, the party rented office for a volunteer hub in a downtown Ottawa building now occupied by Canada 2020. The party paid more than $13,000 to use the space, at market rates, according to a Canadian Press report.

Data Sciences Inc. maintains a makeshift office in the same building on O’Connor Street, above a deli restaurant. The building is also home to the Bluesky Strategy Group, a lobbying firm whose principals -- Tim Barber and Susan Smith -- founded Canada 2020 along with Pitfield.