Rules preventing demonstrators sleeping near the Houses of Parliament have been upheld by the high court in a landmark ruling.

Two judges rejected a test case human rights challenge on Friday brought by veteran peace campaigner Maria Gallastegui, who has been conducting an authorised 24-hour vigil on the East Pavement of Parliament Square in London since 2006.

Sir John Thomas, who is president of the Queen's Bench Division, sitting with Mr Justice Silber, said the rules were "plainly" lawful and did not contravene the Human Rights Act.

Gallastegui, 53, a former coach driver from Hammersmith, west London, said she was hopeful of overturning the ruling on appeal.

"I am hopeful that I can still win," she said after the hearing. "The ruling today didn't surprise me really."

She added: "I'm not just fighting this case for me now. There's a lull in protest at the moment. This is for the future - for if another issue comes along and there is a critical mass of people who want to protest against, for example, another war."

Gallastegui said she had been involved with the Parliament Square protest for 10 years and had lived on the site for six years.

Judges said Gallastegui could not be moved until after a further high court hearing next Thursday.

At that hearing, lawyers for Gallastegui said they would probably seek permission to appeal.