An Oregon woman says she thought she was opening up her family’s ranch to local Muslims to teach them how to grow and can veggies — and that her husband was even expecting a tax write-off.

But US-born Muslim convert Eva Hatley testified in Manhattan federal court Tuesday that after the “carloads’’ of fellow Muslims she met through her mosque arrived at the 160-acre ranch in Bly in 1999, the couple watched helplessly as their home was turned into an al Qaeda training camp.

“It wasn’t anything like I envisioned for the property,” insisted Hatley, testifying at the trial of one-eyed, hook-handed hate preacher Abu Hamza al-Masri.

Hatley, a two-time witness-protection-program flunky who prefers going by her Muslim name, Ayat Hakimah, said other Muslims from London would soon arrive on al-Masri’s orders.

Hatley’s then-husband, Ivan Rule, was temporarily out of town “shepherding” while his longtime ranch was being overrun with terrorists-in-training, she said.

According to al-Masri’s lawyer last week, the camp was similar to being in the “Cub Scouts,’’ with the men riding horses, tending to little lambs and telling campfire stories.

But Hatley said one of the arrivals, militant Oussama Kassir, boasted about previously running training camps in Afghanistan and being a “hit man” for Osama bin Laden.

She said Kassir told her that al-Masri was his “leader” and that al-Masri sent him and others to the Bly ranch to create a “training camp” where men would learn to shoot guns, throw knives and do calisthenics along open, spacious fields abutting a ravine and desolate dirt roads.

“He said he was there to train men for jihad,” she said. “He said that Abu Hamza sent him. He intended to train them to fight.”

The visitors, she claimed, said the ranch resembled Afghanistan.

She added that some had CDs with information on how to make poisons to “kill people” and regularly “talked” about “robbing and killing truck drivers” on nearby roads.

Kassir, she recalled, claimed there were plans to eventually dig a hillside compound at the ranch for al-Masri to hide out in.

“I was shocked,” said Hatley, who claims she fled the ranch in fear in December 1999, four months after moving in.

During cross-examination, al-Masri’s lawyer Jeremy Schneider painted the gun-loving Hatley as paranoid and having a shady track record.

She admitted to him under oath that she agreed to marry her husband after only their first encounter — and had tricked him into thinking she had money.

She claimed she feared that Rule — who was married four previous times and had 18 kids — wanted to kill her and had “suffocated” his previous wife to death.

When asked if Rule, al-Masri, Kassir or others who stayed at the ranch had ever threatened her, she said, “No, but I am still afraid.”

Hatley went into witness protection in 2004 but was kicked out years later for telling one of her new neighbors her secret.

She was given a second chance, but the feds booted her again after she violated multiple rules, including driving with a suspended license.

Besides setting up the training camp, al-Masri, 56, is accused of conspiring in a 1998 kidnapping in Yemen that resulted in the deaths of four tourists and committing other terror crimes. He faces life in prison if convicted.

Kassir, a Lebanese-born Swede, was convicted in 2009 of plotting to help al Qaeda recruit by trying to set up a weapons training post at the ranch and distributing terrorist training manuals over the Internet.