PORTLAND, Maine — A 36-year-old Pennsylvania man who admitted using the Internet to harass and intimidate a Canadian woman studying in Maine was sentenced Wednesday in U.S. District Court to two years in prison.

Makwan Jaff of Mechanicsburg, Pennsylvania, who is an Iraqi national, also was sentenced to three years of supervised release, the first of which must be served under house arrest.

He remains free on $10,000 unsecured bail. Conditions include electronic monitoring and house arrest, according to information posted on the court’s electronic case filing system.

Jaff pleaded guilty in September to one count of interstate stalking.

The incidents that led to the charges began 2½ years ago, while Jaff and his victim were attending the University of Medicine and Health Sciences in Basseterre, Saint Kitts and Nevis, located in the West Indies, according to the U.S. attorney’s office.

The woman, then 25, was a South African national whose legal residence was in Canada, an affidavit filed in federal court in Portland said.

In September 2013, Jaff told the woman in person he loved her, the affidavit said. She never saw him again, but on Feb. 11, 2014, he began sending her daily harassing and threatening messages.

Jaff reportedly created about five Facebook accounts in the victim’s name or variations of her name, with added pejorative words, and posted pictures of her through them without her knowledge or permission.

Once the Facebook accounts were deleted by the victim, Jaff sent threatening email and Facebook private messages to her and her family.

During these communications from St. Kitts, Jaff threatened to harm the victim and another classmate who were attending school in Scarborough in May and June 2014. He threatened to come to Maine and threatened to harm her family in Canada.

Jaff’s conduct caused substantial emotional distress to the victim and her immediate family, the prosecution said.

He was arrested in North Carolina in August 2014, according to court documents and previously published reports. He was charged with stalking in U.S. District Court in Portland, according to information posted on the court system’s website.

He faced up to five years in prison and a $250,000 fine.

BDN writer Dawn Gagnon contributed to this report.