ST. PETERSBURG, Russia — Russian judges have granted bail for 29 of the 30 people arrested following an anti-oil drilling protest by Greenpeace in Arctic waters two months ago.

Thirteen more of the Greenpeace detainees were freed from jail on Friday and the last three crewmembers were granted bail. In all, 24 of 30 people have been released.

Phil Ball of the United Kingdom and Russians Dima Litvinov and Roman Dolgov were the last of the 30 crewmembers to be brought before the court, where they were granted bail at 2 million rubles ($61,500).

Earlier Friday, U.S. ship captain and veteran Greenpeace activist Peter Willcox, who has ties to Maine, was released on bail.

“I feel like I’m down out of the tree but still in the forest,” Willcox told journalists. “But it’s a big step.”

Willcox is married to Maggy Willcox, publisher of the Islesboro Island News, though he still lives in his native Connecticut.

All 30 still face hooliganism charges, which carry a sentence of up to seven years. They were detained after some of the activists aboard the Arctic Sunrise ship, captained by Willcox, attempted to scale an offshore drilling platform owned by the state-owned natural gas giant Gazprom.

Crewmembers Marco Weber of Switzerland, Mannes Ubels and Faiza Oulahsen of the Netherlands, Paul Ruzycki of Canada, Jonathan Beauchamp of New Zealand, Miguel Hernan Perez Orsi of Argentina, and Britons Anthony Perrett, Alexandra Harris, Iaian Rogers, Jonathan Bush, Frank Hewetson and freelance videographer Kieron Bryan were also released on Friday.

Greenpeace lawyers are filing an appeal for the release of Australian Colin Russell, who was denied bail on Monday.

Photographer Denis Sinyakov, who was released Thursday, said he believed the decision to grant bail to the detainees came from the top — and Russell, who was the first to face the court, was denied bail simply because his judge hadn’t gotten the signal in time.

It remained unclear whether the foreigners, who have no Russian visas, would be allowed to leave the country.