Lawyers for Julian Assange said they would appeal after a Stockholm judge rejected their challenge to the warrant for his arrest, condemning the WikiLeaks founder to remain in the Ecuador embassy in London.

"The court believes there is probable cause for the crimes of which he is accused," judge Lena Egelin said in a statement to the court.

"He has chosen himself to go into the embassy and … the court does not believe that the deprivation of his liberty is such as to be disproportionate" to the allegations, she said.

No charges have been brought against Assange in Sweden but he is wanted for questioning by police over allegations of sexual molestation and rape involving two women he met during a visit to the country in 2010.

Prosecutors have declined to question him in London. Prosecutors Marianne Ny and Ingrid Isgren said on Wednesday that interviewing a suspect abroad was not appropriate in crimes of a sexual nature.

Isgren told the court: "You need to have several interviews, you go back to the suspect and confront him, you go to the scene of the crime. Also we cannot take DNA swabs against the suspect's will."

Assange sought refuge in Ecuador's embassy in Britain in June 2012 after having exhausted all legal options in British courts to avoid being extradited to Sweden.

This was the first official legal debate in the case since that time.

"We are confident and have strong legal arguments to get the decision overruled in the court of appeal," Assange lawyer Tholmas Olsson told the Guardian, adding that the judge's statement was formal and gave no indication of the reasoning behind it.

"It took two hours today for the judge to rule, so it must have been a difficult decision."

He and his colleague, Per Samuelson, had earlier attempted to break the two-year deadlock in the case by attacking the "passivity" of Swedish prosecutors in refusing to interview the WikiLeaks founder in his London hideout.

Samuelson told the court: "The prosecutor has a duty to break the deadlock. If the mountain won't come to Muhammad then Muhammad must go to the mountain.

Ecuador had granted Assange asylum in good faith and in accordance with international law because of threats to his life, Samuelson said – not so he could avoid justice in Sweden. He played a seven-minute YouTube video to the court in which US politicians called Assange a terrorist and demanded that he be assassinated.

Olsson said: "I have been present when the CIA interviewed suspects in Sweden, so if they can come to Sweden then how can the prosecutor say it is tough to go to London."

Elisabeth Massi Fritz, lawyer for one of the women who brought the accusations against Assange, said: "This was a proper and expected decision by the Stockholm district court. Assange cannot dictate the terms of the Swedish investigation.

"The only reason that the investigation is not progressing is Assange himself. Sooner or later he will be arrested and brought to Sweden."

Assange has acknowledged that even if the Swedish prosecutors decided to drop the case, it is only one part of the legal battle that keeps him marooned at the embassy. During a conference call in June he told reporters: "I still have the larger problem, which is that of the United States and its pending prosecution, and perhaps extradition warrant."

Frustration at the legal deadlock in the case has seen Swedish legal opinion at a senior level swing against the prosecutor's refusal to travel to interview Assange in London, with Anne Ramberg, head of the Bar Association, calling the impasse a circus.

Sven-Erik Alhem, a former chief prosecutor, this week accused his successor of making "thunderous errors" in the case.

A date for the appeal court hearing is likely to be set next week, Assange's lawyers said.

Outside the Ecuador embassy in Knightsbridge a handful of Assange supporters greeted the decision with disappointment.

"Americans are pulling the strings, so this is no surprise to me," said Lance Rolls, 51, holding a placard which read: 'End the witch hunt. Free Assange'. The Americans want him and that's that. They are all in this together."

Jim Curran, 67, who campaigns against extraditions to the US, said: "The British foreign secretary should make a request to the Swedish foreign secretary for the Swedes to come here and interview him."

Earlier there had been suggestions that Assange might try to leave the embassy if he won the case, but that possibility was played down by his New York-based lawyer, Michael Ratner.

"The fear here was not about Sweden but that Sweden was going to be a place that would extradite him to the US," he said. "Until we can get an assurance from the US government of non-prosecution, leaving the Ecuador embassy would be a very high risk move. The US could say it has no plans to arrest him, but unless it does so, I would not recommend him stepping out of the embassy. There has to be some negotiation with the US before he leaves or the British need to recognise his right to asylum and let him get on a plane to Ecuador."

The possibility that he would be arrested should he leave the embassy, which is directly behind Harrods, was made plain by a Metropolitan police sergeant outside the embassy who said: "He's going to get nicked, if he comes out."