Documents filed with the Federal Court show the former Harper government was concerned about the legal and political fallout from how it dealt with a New Brunswick potato farmer jailed for more than a year in Lebanon.

Henk Tepper languished in a Beirut jail cell in 2011 and 2012 on allegations he tried to export diseased potatoes to Algeria.

In 2013, he launched a lawsuit against the Canadian government, saying the government didn't do enough to try to secure his freedom, and therefore his right to life, liberty and security of person were violated.

The lawsuit, which seeks $16.5 million in damages, also says the RCMP provided private information, including the annual sales of Tepper's farm and value of his home, to Algerian authorities in contravention of the Privacy Act.

In a 13-page statement of defence, the government said it provided Tepper with diplomatic help and made "numerous and frequent diplomatic interventions" on his behalf.

It states there were about 10 meetings between Tepper and representatives of the Canadian government to monitor his well-being, 40 phone conversations with Tepper's family members and 50 interactions with his lawyers.

The case has yet to make it to trial, although a pre-trial conference is set for Monday in Ottawa.

Documents — including government emails — disclosed by the defence and filed with the court last week show that, during his incarceration, officials cautioned each other about saying anything publicly that could help in a Tepper lawsuit.

Tepper had already filed a civil suit against the Canadian Food Inspection Agency for negligence concerning inspections and documents for the potato shipment to Algeria in 2007.

Henk Tepper, in the red and black coat, hugs family and friends as he arrives home in Drummond, N.B., his first time seeing most of them in more than a year. Tepper was jailed in Lebanon on charges that he sold tainted potatoes in Algeria. (Catherine Harrop/CBC)

Someone had doctored one of the inspection reports to say the shipment was all approved, when in fact a portion of the shipment — from Quebec — had tested positive for Bacterial Ring Rot which is a quarantine pest in Algeria.

Tepper was unaware that Algeria had been granted an Interpol Red Notice for his arrest, until he was stopped by authorities in Lebanon when he arrived for an agricultural trade mission.

Tepper's detention and possible extradiction to Algeria generated a lot of public and media attention, and according to the documents filed with the court — a lot of discussion among government and consular officials.

Notes from one meeting of consular staff read "given Tepper's role, the commercial world of the Maritimes, there is a lot of interest at the political level. The family is extremely litigious."

Another email, dated April 11, 2011, reads "MSFA (Minister of State Foreign Affairs) has instructed us to meet Thursday with Mr. Tepper's wife and sister. There will have to be solid preparation for this. Otherwise — add another $100 million to the legal liability fund."

Emails show then-minister of state for foreign affairs, Diane Ablonczy was advised by staff that there was no reason to do something out of the ordinary for Tepper since he was suing the federal government. (CBC )

By July 5, 2011, the-then minister of state for foreign affairs, Diane Ablonczy, wrote an email saying, "I foresee another Tepper lawsuit against GoC for business/monetary losses relating to our 'failure' to have him released. Points up importance of better communication with Canadians about what we can and cannot do, especially with regards to the legal process in other countries."

At the time, one of the people exerting pressure on the government to secure Tepper's release was Senator Pierrette Ringuette of New Brunswick, and it appears government officials were not happy about it, often complaining in emails that the senator was misrepresenting the facts.

During one string of emails, staff of the ministry of state foreign affairs complained about the senator and raised concerns about a planned meeting between her and officials of the RCMP.

"The more we cater to this woman the longer the story lives on. There is no good that can come of this meeting," one person wrote.

The response was, "OK. I did want to throat punch her though …," with a subsequent reply alluding to a profane sexist smear.

Liberal Senator Pierrette Ringuette, seen here speaking with constituents Berend Tepper and Jan Tepper, left to right, father and brother of potato farmer Henk Tepper, after his release from a Lebanese jail. (Andrew Vaughan/Canadian Press)

By November 2011, John Baird, the-then foreign affairs minister, was considering a call to the Lebanese justice minister requesting that Tepper be expelled back to Canada.

However in an email to Ablonczy, staff advised "we have no reason to put all our eggs in one basket for this guy and not some of our other cases where there is more humanitarian reasons to do so."

And: "In addition, Mr. Tepper is currently suing the GoC … seems odd why we would do something out of the ordinary for him and not others."

Tepper was held in a basement cell that measured about five metres by 10 metres. It was dark and infested with cockroaches and spiders.

Watch a 2012 interview with Henk Tepper by the CBC's Harry Forestell. It was Tepper's first televised interview since being released from a Beirul jail.

In his first televised interview since his release from a Lebanon jail three months ago, the New Brunswick potato farmer says Ottawa failed him 3:05

Tepper eventually returned to Canada on March 31, 2012, after his lawyers obtained a Lebanese presidential decree.

Following his return to Canada, Tepper said he felt let down by his own government.

Although Tepper is free and back in New Brunswick, the Interpol Red Notice remains in place, keeping him from travelling outside of the country.