A sheriff allowed Jashua Tremblay to say goodbye to his adult girlfriend in an Edmonton courtroom Wednesday afternoon.

Then the 34 year old was led away to begin serving a four-and-a-half-year sentence for his illegal sexual relationship with a young teen.

Tremblay established an online relationship with the 13-year-old Irish girl in September 2012. He groomed her for 14 months, then flew to Dublin twice to spend time with her. The trysts were described in court as 'sex vacations.'

Court of Queen's Bench Justice Mary Moreau listed a number of aggravating factors before she sentenced Tremblay, noting he "groomed and desensitized the complainant" and had sex with her on multiple occasions. Moreau said the time, money and effort Tremblay spent to stay with the girl "could only have led the teen to believe he had serious intentions."

She called it "predatory sexual contact" that "caused emotional harm to the child."

First Alberta child sex tourism conviction

The child sex tourism law came into effect in 1997. It means Canadians and permanent residents can be prosecuted in Canada if they sexually exploit children in other countries.

Crown prosecutor Craig Krieger has focused on internet crime for the past decade. (Janice Johnston/CBC)

This was the first time Crown Prosecutor Craig Krieger worked on a child sex tourism case.

"Normally only Ireland would be able to prosecute him," Krieger said outside court. "But because of this special provision, we were able to prosecute him here for the sexual contact with a child."

Krieger said it's fortunate Canada has the special provision, because he was surprised to discover we don't have an extradition treaty with Ireland. So Tremblay likely would have gone unpunished for his illegal sexual contact with the teen.

"Under the old system, that only could have been prosecuted in Ireland," he said. "So they would have had to wait for him to appear there somehow someday which probably would have been a slim hope."

Krieger praised Irish police for what he described as a thorough investigation.

"I really want to give credit to the police in Ireland. Even though they probably knew from the beginning, there was a slim chance of them seeing the accused face to face. But they put a tremendous amount of effort to prove the identity of who this adult was who had come to violate one of their kids."

No online communication with children

Tremblay will have to abide by a number of conditions after serving his sentence.

He'll be prohibited from working or volunteering with children under the age of 16 for 10 years after his release unless it directly involves his son. The judge has also ordered him not to communicate online with anyone under the age of 16 other than his son or stepchildren for a decade after his release.

The judge was told Tremblay will likely have to declare bankruptcy once he begins serving time in prison. He said he was unable to pay a $1,000 victim surcharge fine, so an additional six days was added to his sentence.