Sheffield student who created TVShack website will have to travel to US and pay a small sum of compensation, court told

Richard O'Dwyer, the university student who created a website which linked to programmes and films online for free, has reached an agreement to avoid extradition to the US over copyright infringement allegations, the high court has been told.

The 24-year-old Sheffield Hallam undergraduate has signed a draft "deferred prosecution" agreement in the past two days which requires him to travel to the US and pay a small sum of compensation but will mean he will not face a trial or criminal record, the court was told.

In June, Wikipedia founder Jimmy Wales launched a campaign with the Guardian in defence of O'Dwyer, describing the student as the "human face" of a global battle over the interests of the film and TV industries and the wider public.

Julia O'Dwyer, Richard's mother who has campaigned relentlessly for her son, said she could not believe the case had turned out "so well". "I didn't know this was going to happen today – I'm at work! I read a comment on Twitter with someone reporting what the judge had said and just burst into tears," she said.

"It's been a fraught few days waiting for them: they were delayed on the US side, because all the offices are in New York and it was all due to the hurricane [Sandy] that hit them. It's a bit of a relief – I can't believe it really, that it's turned out like this, so well. I don't know what I'm going to do with myself."

She had not yet heard from her son, who was in classes, but added: "We've got hundreds of thousands of 'thank yous' to be saying."

The deal brings resolution to a case that has attracted widespread criticism around the world and particularly in Britain, where UK authorities pursued no charges against him and MPs of all parties urged the home secretary to halt the extradition.

More than 253,000 people have signed Wales's petition, calling on the home secretary to block O'Dwyer's extradition to the US on charges that could have carried a sentence of up to 10 years in jail.

In spite of the outcry, however, Theresa May insisted she would not back down from her approval of the extradition, given earlier this year, saying in July that the decision had "already been taken" and that O'Dwyer had to rely on his appeal.

The decision proved highly unpopular among the British public, with a YouGov poll finding 46% believed O'Dwyer should not be prosecuted at all, and only 9% thought he should be sent to the US for trial.

Dominic Raab, a Tory MP who supported the campaign to halt O'Dwyer's extradition, welcomed the agreement but said the case had illustrated the need for extradition law reform. "This is a victory for Richard and his family, a victory for British justice, and a victory for common sense," he said. "Now we need to put in law a proper safeguard to prevent these arbitrary cases from happening again. We shouldn't be subjecting British citizens to rough justice under our blunt extradition regime."

Isabella Sankey of the human rights campaign group Liberty said: "This will be a huge relief for Richard – but how appalling that he had to wait so long for the US authorities to make this decision.

"Case after case shows that our extradition arrangements must be overhauled to allow people who have never left these shores to be dealt with here at home. We need urgent legislation to prevent their torment."

Speaking at the high court, Sir John Thomas, president of the Queen's Bench Division and the third most senior judge in England and Wales, said the deal was a "very satisfactory outcome" to the long-running case.

O'Dwyer's extradition application is due to return to the high court in 15 days' time so it can be formally disposed of. He is meanwhile expected to go to the US and fulfil the terms of the agreement, which, as well as payment, demand undertakings not to infringe copyright laws again.

Thomas added: "It would be very nice for everyone if this was resolved happily before Christmas."

O'Dwyer, who set up TVShack in 2007 at the age of 19, was arrested on allegations of copyright infringement in 2010. A criminal investigation in the UK was dropped soon after. The Immigration and Customs Enforcement Agency in the US shut down his website and claimed he earned more than $230,000 (£147,000) in advertising revenue from it. A request for his extradition was then launched.

In an interview with the Guardian in June, O'Dwyer said the US authorities were trying to use him as a test case. "I think they're trying to use my website as a sort of guinea pig to try to scare everyone else making linking websites," he said.