Five Americans accused of plotting terrorist acts with militants in Pakistan they had met via the internet were each sentenced to 10 years in jail by a Pakistani court today.

The US nationals, all in their 20s, come from Alexandria, Virginia, and were arrested in Sargodha, Punjab, in December after their families reported them missing.

Prosecutors alleged they had found extremist groups from the US using Facebook and YouTube with the intention of travelling to Pakistan and crossing into Afghanistan to fight western soldiers.

A judge convicted each defendant on charges carrying custodial sentences of five and 10 years, to be served concurrently, and imposed fines totalling 70,000 rupees (£550). Their lawyer said they would appeal.

The case is one of several involving "homegrown" American militants, but is the only one to be tried in a Pakistani court. Journalists and members of the public were barred from the trial, which was heard by a single judge under heavy security in a special anti-terrorism court.

Aged between 19 and 25, the men are all Muslims. One, Ramy Zamzam, is of Egyptian descent and was a dental student at Washington's Howard University. Two others, Umer Farooq and Waqar Hussain, are of Pakistani origin, while Ahmed Minni and Aman Hassan Yemer come from Eritrea and Yemen.

Pakistani police alleged the men had contacted Taliban-linked extremists with the intention of attacking the Chashma barrage, a hydroelectric power plant near sensitive nuclear facilities. They also accused them of seeking to travel to Afghanistan. One allegedly left a farewell video in the US that featured war footage and said Muslims must be defended.

The Americans said they had gone to Sargodha for a wedding, and were on their way to Afghanistan to provide humanitarian assistance to fellow Muslims. They accused Pakistan's police of fabricating evidence, including emails, in an effort to frame them.

As they were transported to a court hearing last February, they tossed a scrap of toilet paper to journalists on which they claimed to have been tortured in custody. In a letter his parents, Zamzam said they had been beaten, deprived of food and sleep for up to 36 hours and threatened with electrocution.

Farooq's father, Khalid, was also detained but released for lack of evidence.

The men's defence had been organised by Khalid Khawaja, a well-known jihadi sympathiser who was kidnapped and executed by the Taliban in Waziristan in April.

US officials maintained a low profile during the case. A consular official was present at today's hearing but a spokesman in Islamabad declined to comment.

Another American who slipped into Pakistan on a quixotic quest to kill Osama bin Laden has arrived home. Gary Faulkner was arrested in a mountain woods near the Afghan border on 13 June.

Carrying a pistol, a sword and a book of Christian verse, the 50-year-old told officers he was on a quest to find the al-Qaida leader and behead him. After questioning by Pakistani intelligence he was released yesterday morning and arrived in Denver at around midnight.

"This is not about me. What this is about is the American people and the world," he told reporters at the airport.

"We can't let people like this scare us. We don't get scared by people like this, we scare them and that's what this is about. We're going to take care of business."